test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / ansi2knr-no-more.sh
old mode 100755 (executable)
new mode 100644 (file)
index 452abd3..b2b5752
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-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 any attempt to use the obsolete de-ANSI-fication support
 # is diagnosed.
 
-. ./defs || exit 1
+. test-init.sh
 
 warn_rx='automatic de-ANSI-fication.*removed'
 
@@ -32,7 +32,7 @@ $ACLOCAL -Wnone 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep "^configure\\.ac:5:.*$warn_rx" stderr
 
-cat aclocal.sav "$am_automake_acdir"/protos.m4 > aclocal.m4
+cat aclocal.sav "$am_automake_acdir"/obsolete.m4 > aclocal.m4
 $AUTOCONF -Wnone 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep "^configure\\.ac:5:.*$warn_rx" stderr
@@ -45,7 +45,7 @@ for opt in ansi2knr lib/ansi2knr; do
   AUTOMAKE_fails -Wnone
   grep "^Makefile\.am:1:.*$warn_rx" stderr
   # ansi2knr option in configure.ac
-  echo > Makefile.am # 'echo', not ':', for Solaris /bin/sh.
+  : > Makefile.am
   sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([$opt])|" configure.sav >configure.ac
   cat configure.ac # For debugging.
   rm -rf autom4te*.cache