From: Jim Meyering Date: Mon, 1 Feb 2010 10:09:14 +0000 (+0100) Subject: tests: note that znew-k test depends on length of temp file name X-Git-Tag: v1.5~113 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=be1f6c5563634e81f8ae59201bce12ccabe3fdab;p=debian%2Fgzip tests: note that znew-k test depends on length of temp file name * tests/znew-k: Tweak diagnostic, factor and add a surprising comment. --- diff --git a/tests/znew-k b/tests/znew-k old mode 100755 new mode 100644 index 9a334c8..d63ec26 --- a/tests/znew-k +++ b/tests/znew-k @@ -27,16 +27,20 @@ fi cat <<'EOF' >compress || framework_failure #!/bin/sh -echo >&2 'compress have been called' +echo >&2 'compress has been invoked' exit 1 EOF chmod +x compress || framework_failure -printf '%1012977s' ' ' | gzip -c >znew-k.Z || framework_failure +# Note that the basename must have a length of 6 or greater. +# Otherwise, "test -f $name" below would fail. +name=123456.Z + +printf '%1012977s' ' ' | gzip -c > $name || framework_failure fail=0 -znew -K znew-k.Z || fail=1 -test -f znew-k.Z || fail=1 +znew -K $name || fail=1 +test -f $name || fail=1 Exit $fail