# HG changeset patch # User Anton Shestakov # Date 1623821368 -10800 # Node ID 8e78e0f316b38a11841879a60e31fa8939d15dba # Parent 2068ff9ad72a6328ece32559a65a02930978ae4f tests: improve tarball size check in test-check-sdist.t Instead of relying on globs for checking numbers, let's rely on find(1)'s ability to check file size in a more intelligent way. I would write the number as +800k, but it's not supported in some implementations of find, so it's not portable. Instead have to use "c" to make find(1) use bytes instead of 512-byte blocks, which is the default (???). diff -r 2068ff9ad72a -r 8e78e0f316b3 tests/test-check-sdist.t --- a/tests/test-check-sdist.t Mon Jun 14 16:41:29 2021 +0200 +++ b/tests/test-check-sdist.t Wed Jun 16 08:29:28 2021 +0300 @@ -30,8 +30,8 @@ no previously-included directories found matching '.gitlab' $ cd "$TESTTMP"/dist - $ wc -c hg-evolve-*.tar.gz - 8????? hg-evolve-*.tar.gz (glob) + $ find hg-evolve-*.tar.gz -size +800000c + hg-evolve-*.tar.gz (glob) $ tar -tzf hg-evolve-*.tar.gz | sed 's|^hg-evolve-[^/]*/||' | sort > files $ wc -l files