2 # Copyright (C) 2012-2013 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Check that "aclocal --install" fails when it should.
18 # FIXME: this is a good candidate for a conversion to TAP.
20 am_create_testdir=empty
24 cat > configure.ac <<END
30 cat > sys-acdir/my-defs.m4 <<END
31 AC_DEFUN([MY_MACRO], [:])
34 ACLOCAL="$ACLOCAL -Wnone --system-acdir=sys-acdir"
38 chmod a-w unwritable-dir
40 $ACLOCAL -I a-regular-file --install 2>stderr \
41 && { cat stderr >&2; exit 1; }
43 $EGREP '(mkdir:|directory ).*a-regular-file' stderr
46 $ACLOCAL --install -I unwritable-dir/sub 2>stderr \
47 && { cat stderr >&2; exit 1; }
49 $EGREP '(mkdir:|directory ).*unwritable-dir/sub' stderr
52 $ACLOCAL -I unwritable-dir --install 2>stderr \
53 && { cat stderr >&2; exit 1; }
55 $EGREP '(cp:|copy ).*unwritable-dir' stderr
60 $ACLOCAL -I m4 --install && test -f aclocal.m4 \
61 || fatal_ "aclocal failed also when expected to succeed"