test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / comment4.sh
old mode 100755 (executable)
new mode 100644 (file)
index 42e7bf9..0d9d0c1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-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
@@ -16,7 +16,7 @@
 
 # Make sure commented variables are output near their comments.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_OUTPUT
@@ -31,9 +31,11 @@ EOF
 
 $ACLOCAL
 $AUTOMAKE
-# UnIqUe_COPYRIGHT_BOILERPLATE should appear near the top of the file
-test `sed -n -e '1,/UnIqUe_COPYRIGHT_BOILERPLATE/p' Makefile.in \
-      | wc -l` -le 30
+# UnIqUe_COPYRIGHT_BOILERPLATE should appear near the top of the file.
+test $(sed -n -e '1,/UnIqUe_COPYRIGHT_BOILERPLATE/p' \
+                 Makefile.in | wc -l) -le 30
 # UnIqUe_MUMBLE_COMMENT should appear right before the mumble declaration.
-test `sed -n -e '/UnIqUe_MUMBLE_COMMENT/,/UnIqUe_MUMBLE_VALUE/p' Makefile.in \
-      | wc -l` -eq 2
+test $(sed -n -e '/UnIqUe_MUMBLE_COMMENT/,/UnIqUe_MUMBLE_VALUE/p' \
+                 Makefile.in | wc -l) -eq 2
+
+: