#! /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"
$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"
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
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
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'.
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
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