am-ft: make the environment available earlier
[platform/upstream/automake.git] / t / override-conditional-1.sh
old mode 100755 (executable)
new mode 100644 (file)
index 1f66d3f..7dc4188
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-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 @@
 
 # Test for conditionally-defined overrides.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND], [test x"$cond" = x"yes"])
@@ -36,7 +36,7 @@ $ACLOCAL
 $AUTOMAKE -Wno-override
 
 # "ps:" should be output in two conditions
-test `grep '[^-]ps:' Makefile.in | wc -l` = 2
+test $(grep -c '[^-]ps:' Makefile.in) -eq 2
 grep '@COND_TRUE@ps: *foobar' Makefile.in
 grep '@COND_FALSE@ps: *ps-am' Makefile.in
 
@@ -44,7 +44,7 @@ $AUTOCONF
 
 ./configure cond=no
 $MAKE ps
-test ! -r foobar
+test ! -e foobar
 
 ./configure cond=yes
 $MAKE ps