typo + new comment
[automake.git] / tests / dirname.test
blob6426e601efe33d8b5918d9f2ebbafce34e2cc906
1 #! /bin/sh
3 # Test the operation of the _AM_DIRNAME macro from m4/header.m4
5 . $srcdir/defs || exit 1
7 cat > configure.in << 'END'
8 AC_PLAIN_SCRIPT
9 echo "1 /a/path/to/a/file = _AM_DIRNAME([/a/path/to/a/file])"
10 echo "2 another/path/to/a/file = _AM_DIRNAME([another/path/to/a/file])"
11 echo "3 file = _AM_DIRNAME([file])"
12 echo "4 // = _AM_DIRNAME([//])"
13 echo "5 //file = _AM_DIRNAME([//file])"
14 echo "6 / = _AM_DIRNAME([/])"
15 echo "7 /file = _AM_DIRNAME([/file])"
16 END
18 # Fail gracefully if no autoconf.
19 $needs_autoconf
21 $ACLOCAL || exit 1
22 $AUTOCONF || exit 1
24 # fail gracefully if autoconf didn't support AC_PLAIN_SCRIPT, because it won't
25 # support our regexps anyhow
26 test -s configure || exit 77
28 $SHELL ./configure >got || exit 1
30 cat >wanted <<EOF
31 1 /a/path/to/a/file = /a/path/to/a
32 2 another/path/to/a/file = another/path/to/a
33 3 file = .
34 4 // = //
35 5 //file = //
36 6 / = /
37 7 /file = /
38 EOF
40 diff -u wanted got || exit 1
42 exit 0