From bf258729df870cf308f9f92e833d75f192d48a2d Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Fri, 29 Jun 2012 00:48:11 +0200 Subject: 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 --- t/test-missing.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 't/test-missing.sh') diff --git a/t/test-missing.sh b/t/test-missing.sh index 441a83894..7cf1d52af 100755 --- a/t/test-missing.sh +++ b/t/test-missing.sh @@ -42,19 +42,19 @@ cat output test -f ok.log grep '^PASS: ok\.test' output $FGREP 'zardoz.log' output -test ! -f test-suite.log +test ! -e test-suite.log TESTS='zardoz2.test' $MAKE -e check >output 2>&1 \ && { cat output; exit 1; } cat output $FGREP 'zardoz2.log' output -test ! -f test-suite.log +test ! -e test-suite.log TEST_LOGS='zardoz3.log' $MAKE -e check >output 2>&1 \ && { cat output; exit 1; } cat output $FGREP 'zardoz3.log' output -test ! -f test-suite.log +test ! -e test-suite.log # The errors should persist even after 'test-suite.log' # has been created. @@ -66,6 +66,6 @@ rm -f zardoz.test $MAKE check >output 2>&1 && { cat output; exit 1; } cat output $FGREP 'zardoz.log' output -test ! -f test-suite.log +test ! -e test-suite.log : -- cgit v1.2.1