test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / install2.sh
old mode 100755 (executable)
new mode 100644 (file)
index f1992e8..67dd3d4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-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
 # Test for bug in 'make dist'
 # From Pavel Roskin.
 
-. ./defs || Exit 1
+am_create_testdir=empty
+. test-init.sh
 
-cat > configure.ac << 'END'
-AC_INIT
+cat > configure.ac << END
+AC_INIT([$me], [1.0])
 dnl Prevent automake from looking in .. and ../..
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(foo, 0.1)
-AC_OUTPUT(Makefile)
+AC_CONFIG_AUX_DIR([.])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -44,7 +46,7 @@ test ! -r Makefile.am || skip_ "cannot drop file read permissions"
 
 # 'dist' should fail because we can't copy Makefile.am.
 if $MAKE dist; then
-  Exit 1
+  exit 1
 else
-  Exit 0
+  exit 0
 fi