am-ft: make the environment available earlier
[platform/upstream/automake.git] / t / aclocal.sh
old mode 100755 (executable)
new mode 100644 (file)
index 4030b13..f298345
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-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 on some aclocal options.  Report from Alexandre Oliva.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 echo "AC_INIT([$me], [0]) AM_INIT_AUTOMAKE" > configure.ac
 
 $ACLOCAL --output=fred
 test -f fred
 
-$ACLOCAL --output 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL --output 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'option.*--output.*requires an argument' stderr
 grep '[Tt]ry.*--help.*for more information' stderr
 
-$ACLOCAL --unknown-option 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL --unknown-option 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'unrecognized option.*--unknown-option' stderr
 grep '[Tt]ry.*--help.*for more information' stderr
 
-$ACLOCAL --ver 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL foobar 2>stderr && { cat stderr >&2; exit 1; }
+cat stderr >&2
+grep 'non-option argument.*foobar' stderr
+grep '[Tt]ry.*--help.*for more information' stderr
+
+$ACLOCAL --ver 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'unrecognized option.*--ver' stderr
 grep '[Tt]ry.*--help.*for more information' stderr