Hash :
d0dd88f3
Author :
Date :
2010-08-11T01:21:29
Tweak and/or extend some `acloca*.test' tests. * tests/aclocal8.test: Ensure verbose printing of captured output. * tests/aclocal.test: Likewise. Also, add trailing `:' command. * tests/acloca19.test: Likewise. * tests/aclocal5.test: Add trailing `:' command, and prefer `$me' over hard-coded test name. * tests/aclocal6.test: Likewise. * tests/aclocal18.test: Add trailing `:' command, and make some grepping slighty stricter. * tests/acloca14.test: Likewise. Also, prefer `diff' over `cmp', and add some "cosmetic" blank lines.
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
#! /bin/sh
# Copyright (C) 2005, 2006, 2008, 2010 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test for --install with #serial numbers.
. ./defs || Exit 1
set -e
cat >> configure.in << 'END'
AM_MACRO1
AM_MACRO2
END
mkdir 1 2 3 4
cat >1/m1.m4 <<EOF
#serial 1.8.1230.9
AC_DEFUN([AM_MACRO1], [echo macro11 >> foo])
AC_DEFUN([AM_MACRO2], [echo macro21 >> foo])
EOF
cat >2/m1.m4 <<EOF
#serial 1.8.1231.9
AC_DEFUN([AM_MACRO1], [echo macro12 >> foo])
EOF
cat >3/m2.m4 <<EOF
#serial 13
AC_DEFUN([AM_MACRO2], [echo macro23 >> foo])
EOF
cat >3/m1.m4 <<EOF
#serial 1.8.1230.1
AC_DEFUN([AM_MACRO1], [echo macro13 >> foo])
EOF
cat >4/mumble.m4 <<EOF
#serial 0
AC_DEFUN([AM_MACRO1], [echo macro14 >> foo])
EOF
ACLOCAL_TESTSUITE_FLAGS='-I 1 -I 2 -I 3 -I 4'
$ACLOCAL
$AUTOCONF
./configure
grep macro11 foo
grep macro21 foo
rm -f foo
$ACLOCAL --install
$AUTOCONF
./configure
grep macro12 foo
grep macro23 foo
ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2 -I 3'
rm -f foo
$ACLOCAL --install --dry-run
$AUTOCONF
./configure
grep macro12 foo
grep macro23 foo
rm -f foo
$ACLOCAL --install
$AUTOCONF
./configure
grep macro14 foo
grep macro23 foo
ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2'
rm -f foo
$ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep 'macro.*AM_MACRO2.*not found' stderr
ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1'
rm -f foo
$ACLOCAL --install
$AUTOCONF
./configure
grep macro14 foo
grep macro21 foo
mkdir dirlist-test
cat >dirlist-test/m1.m4 <<EOF
#serial 456
AC_DEFUN([AM_MACRO1], [echo macro1d >> foo])
AC_DEFUN([AM_MACRO2], [echo macro2d >> foo])
EOF
rm -f foo
$ACLOCAL --diff=diff >stdout 2>stderr || {
cat stderr >&2
cat stdout
Exit 1
}
cat stderr >&2
cat stdout
grep '#serial 456' stdout
test ! -f 4/m1.m4
grep 'installing.*4/m1\.m4' stderr
: