test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / dejagnu-siteexp-useredit.sh
old mode 100755 (executable)
new mode 100644 (file)
index 9be5eba..419acdf
@@ -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 the user can edit the Makefile-generated site.exp, and
 # have its edits survive to the remaking of that file.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -56,7 +56,7 @@ $MAKE site.exp
 cat site.exp
 is_newest site.exp Makefile  # Sanity check.
 grep '|objdir|' site.exp
-test `grep -c '|objdir|' site.exp` -eq 1
+test $($FGREP -c '|objdir|' site.exp) -eq 1
 
 # We can do a "more semantic" check if DejaGnu is available.
 if runtest SOMEPROGRAM=someprogram --version; then