test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / distcom4.sh
old mode 100755 (executable)
new mode 100644 (file)
index dc37fcf..3febb61
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-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 to make sure config files are distributed, and only once.
 # This tries to distribute a file from a subdirectory, without
-# Makefile in that directory.  distcom5.test performs the same
+# Makefile in that directory.  'distcom5.sh' performs the same
 # test with a Makefile in the directory.
-# Also make sure that README appears first in DIST_COMMON.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
    AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
@@ -69,9 +68,7 @@ sed -n -e '/^DIST_COMMON =.*\\$/ {
 
 cat dc.txt # For debugging.
 
-test 1 = `grep tests dc.txt | wc -l`
+test 1 -eq $(grep -c tests dc.txt)
 grep configure dc.txt
-# README must come first.
-grep 'DIST_COMMON = README' Makefile.in
 
 :