summaryrefslogtreecommitdiff
path: root/t/test-trs-recover.sh
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-06-29 00:48:11 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-06-29 00:48:11 +0200
commitbf258729df870cf308f9f92e833d75f192d48a2d (patch)
treed835872bfd85ec82eb047e2eb4ec3f2c9d6d4731 /t/test-trs-recover.sh
parente857a8e7e44592e98848177271d1b41710e4fdaa (diff)
downloadautomake-bf258729df870cf308f9f92e833d75f192d48a2d.tar.gz
tests: prefer "test ! -e FILE" to check that a file doesn't exist
Once, for the sake of (at least) Solaris 10 /bin/sh, we had to use "test ! -f FILE" or "test ! -r FILE" or "test ! -d FILE" instead, because the that shell's 'test' built-in didn't grok the '-e' option. Note however that we still can't use "test ! -e" in the Makefile recipes used in the test cases; that is because those recipes are run with the shell detected by 'configure', and Autoconf-generated configure scripts do no guarantee to find or provide a POSIX-compatible shell. * Several tests: Adjust. * t/yacc-clean-cxx: Adjust, and remove a couple of useless commands. * t/parallel-tests-dry-run-2.sh: Adjust, and add invocation to "make -n" forgotten in previous versions of the test. * t/txinfo26.sh: Adjust, and don't bother to skip the test when it's run in a directory whose absolute path contain whitespace: that setup is not supported anyway. * t/maken3.sh: Adjust, and fix a typo that could cause a minor false negative. * t/test-trs-recover2.sh: Prefer using 'skip_' with a suitable error message over a bare 'exit 77'. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/test-trs-recover.sh')
-rwxr-xr-xt/test-trs-recover.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/t/test-trs-recover.sh b/t/test-trs-recover.sh
index 9235a1d93..95a9ddcec 100755
--- a/t/test-trs-recover.sh
+++ b/t/test-trs-recover.sh
@@ -53,21 +53,21 @@ $MAKE check
rm -f foo.trs bar.trs baz.trs
$MAKE foo.trs
test -f foo.trs
-test ! -f bar.trs
-test ! -f baz.trs
+test ! -e bar.trs
+test ! -e baz.trs
: Recreate by hand, several at the same time.
rm -f foo.trs bar.trs baz.trs
$MAKE foo.trs bar.trs
test -f foo.trs
test -f bar.trs
-test ! -f baz.trs
+test ! -e baz.trs
: Recreate by hand, with a failing test.
rm -f foo.trs bar.trs
TEST_STATUS=1 $MAKE bar.trs baz.trs >stdout || { cat stdout; exit 1; }
cat stdout
-test ! -f foo.trs
+test ! -e foo.trs
test -f bar.trs
test -f baz.trs
grep '^FAIL: bar\.test' stdout
@@ -97,15 +97,15 @@ grep '^PASS: baz\.test' stdout
rm -f foo.trs bar.trs baz.trs
TESTS=foo.test $MAKE -e check
test -f foo.trs
-test ! -f bar.trs
-test ! -f baz.trs
+test ! -e bar.trs
+test ! -e baz.trs
: Recreate with a "make check" with redefined TEST_LOGS.
rm -f foo.trs bar.trs baz.trs
TEST_LOGS=bar.log $MAKE -e check
-test ! -f foo.trs
+test ! -e foo.trs
test -f bar.trs
-test ! -f baz.trs
+test ! -e baz.trs
: Interactions with "make recheck" are OK.
rm -f foo.trs bar.trs baz.log baz.trs
@@ -113,8 +113,8 @@ $MAKE recheck >stdout || { cat stdout; exit 1; }
cat stdout
test -f foo.trs
test -f bar.trs
-test ! -f baz.trs
-test ! -f baz.log
+test ! -e baz.trs
+test ! -e baz.log
grep '^PASS: foo\.test' stdout
grep '^PASS: bar\.test' stdout
grep 'baz\.test' stdout && exit 1