Avoid leaking TEST_LOG_COMPILER in environment of test scripts.
[automake.git] / tests / txinfo20.test
blob5f6de57e6053921e37b4dc81e90897ad8f97cfb7
1 #! /bin/sh
2 # Copyright (C) 2003 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)
7 # any later version.
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 # Make sure info files survive makeinfo errors.
19 required=makeinfo
20 . ./defs || Exit 1
22 set -e
24 echo AC_OUTPUT >> configure.in
26 cat > Makefile.am << 'END'
27 info_TEXINFOS = main.texi sub/main.texi
28 END
30 mkdir sub
32 cat > main.texi << 'END'
33 \input texinfo
34 @setfilename main
35 @settitle main
36 @node Top
37 Hello walls.
38 @bye
39 END
41 cp main.texi sub/main.texi
43 $ACLOCAL
44 $AUTOMAKE --add-missing
45 $AUTOCONF
47 ./configure
48 $MAKE
50 # Feign more info files.
51 : > main-1
52 : > sub/main-1
54 # Break main.texi
55 $sleep
56 cp main.texi main.old
57 cat > main.texi << 'END'
58 \input texinfo
59 @setfilename main
60 @settitle main
61 @node Top
62 @unknown_macro{Hello walls.}
63 @bye
64 END
66 # makeinfo will bail out, but we should conserve the old info files.
67 $MAKE && Exit 1
68 test -f main
69 test -f main-1
71 # Restore main.texi, and break sub/main.texi
72 cp main.texi sub/main.texi
73 mv main.old main.texi
74 $MAKE && Exit 1
75 test -f main
76 test ! -f main-1
77 test -f sub/main
78 test -f sub/main-1