test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / subdir-distclean.sh
old mode 100755 (executable)
new mode 100644 (file)
index 191c018..1274b2a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2013 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 # Check that "./configure && make && make distclean" is actually a
 # no-op, even when conditional SUBDIRS are involved.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub1/Makefile sub2/Makefile sub1/subsub/Makefile])
@@ -66,12 +66,12 @@ test -f sub1/run
 touch sub2/oops sub1/subsub/oops
 
 $MAKE distclean
-test ! -f sub1/run
-test ! -f sub2/oops
-test ! -f sub1/subsub/oops
-test ! -f sub1/Makefile
-test ! -f sub2/Makefile
-test ! -f sub1/subsub/Makefile
+test ! -e sub1/run
+test ! -e sub2/oops
+test ! -e sub1/subsub/oops
+test ! -e sub1/Makefile
+test ! -e sub2/Makefile
+test ! -e sub1/subsub/Makefile
 
 mkdir build
 cd build
@@ -88,12 +88,12 @@ test -f sub1/run
 touch sub2/oops sub1/subsub/oops
 
 $MAKE maintainer-clean
-test ! -f sub1/run
-test ! -f sub2/oops
-test ! -f sub1/subsub/oops
-test ! -f sub1/Makefile
-test ! -f sub2/Makefile
-test ! -f sub1/subsub/Makefile
+test ! -e sub1/run
+test ! -e sub2/oops
+test ! -e sub1/subsub/oops
+test ! -e sub1/Makefile
+test ! -e sub2/Makefile
+test ! -e sub1/subsub/Makefile
 
 cd ..