Tag
Hash :
548fc006
Author :
Date :
2001-07-25T15:27:36
From Nicolas Joly: * tests/pr9.test: Require GNU make. * tests/dirname.test: Don't use `-u'.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
#! /bin/sh
# Test the operation of the _AM_DIRNAME macro from m4/header.m4
. $srcdir/defs || exit 1
cat > configure.in << 'END'
AC_PLAIN_SCRIPT
echo "1 /a/path/to/a/file = _AM_DIRNAME([/a/path/to/a/file])"
echo "2 another/path/to/a/file = _AM_DIRNAME([another/path/to/a/file])"
echo "3 file = _AM_DIRNAME([file])"
echo "4 // = _AM_DIRNAME([//])"
echo "5 //file = _AM_DIRNAME([//file])"
echo "6 / = _AM_DIRNAME([/])"
echo "7 /file = _AM_DIRNAME([/file])"
END
# Fail gracefully if no autoconf.
$needs_autoconf
$ACLOCAL || exit 1
$AUTOCONF || exit 1
# fail gracefully if autoconf didn't support AC_PLAIN_SCRIPT, because it won't
# support our regexps anyhow
test -s configure || exit 77
$SHELL ./configure >got || exit 1
cat >wanted <<EOF
1 /a/path/to/a/file = /a/path/to/a
2 another/path/to/a/file = another/path/to/a
3 file = .
4 // = //
5 //file = //
6 / = /
7 /file = /
EOF
diff wanted got || exit 1
exit 0