tests: avoid a spurious failure on MSYS
[platform/upstream/automake.git] / t / install-info-dir.sh
old mode 100755 (executable)
new mode 100644 (file)
index 3a391bd..b16824f
@@ -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
 # inlined, below.
 
 # FIXME: this test is a good candidate for a conversion to TAP,
-# FIXME: and could be merged with 'txinfo27.test'.
+# FIXME: and could be merged with 'txinfo27.sh'.
 
 required=makeinfo
-. ./defs || exit 1
+. test-init.sh
 
 cwd=$(pwd) || fatal_ "cannot get current working directory"
 
@@ -91,7 +91,7 @@ if test $have_installinfo = yes; then
   $FGREP 'Does nothing at all, but has a nice name' $instdir/info/dir
 
   $MAKE uninstall
-  test ! -f $instdir/info/foo.info
+  test ! -e $instdir/info/foo.info
   $FGREP 'but has a nice name' $instdir/info/dir && exit 1
 
   dir="$destdir/$cwd/$instdir/info"
@@ -101,7 +101,7 @@ if test $have_installinfo = yes; then
   test -f "$dir"/dir
   $FGREP 'Does nothing at all, but has a nice name' "$dir"/dir
   $MAKE DESTDIR="$cwd/$destdir" uninstall
-  test ! -f "$dir"/foo.info
+  test ! -e "$dir"/foo.info
   $FGREP 'but has a nice name' "$dir"/dir && exit 1
 
   unset dir
@@ -118,10 +118,9 @@ echo error from install-info >&2
 exit 127
 END
 chmod a+x bin/install-info
-$MAKE install-info >output 2>&1 || { cat output; exit 1; }
-cat output
+run_make -M install-info
 test -f $instdir/info/foo.info
-test ! -f $instdir/info/dir
+test ! -e $instdir/info/dir
 grep 'error from install-info' output && exit 1
 
 rm -rf $instdir output
@@ -144,7 +143,7 @@ END
   test -f $instdir/info/foo.info
   test -f $instdir/info/dir
   $MAKE uninstall
-  test ! -f $instdir/info/foo.info
+  test ! -e $instdir/info/foo.info
   test -f $instdir/info/dir
   $FGREP 'but has a nice name' $instdir/info/dir && exit 1
   : For shells with busted 'set -e'.
@@ -159,7 +158,7 @@ for val in no NO n; do
   rm -rf $instdir
   env AM_UPDATE_INFO_DIR="$val" $MAKE install-info
   test -f $instdir/info/foo.info
-  test ! -f $instdir/info/dir
+  test ! -e $instdir/info/dir
 done
 
 $MAKE install-info
@@ -180,7 +179,7 @@ if test $have_installinfo = yes; then
     test -f $instdir/info/foo.info
     test -f $instdir/info/dir
     env AM_UPDATE_INFO_DIR="$val" $MAKE uninstall
-    test ! -f $instdir/info/foo.info
+    test ! -e $instdir/info/foo.info
     $FGREP 'but has a nice name' $instdir/info/dir && exit 1
     : For shells with busted 'set -e'.
   done