doc: typos in test file.
[automake.git] / t / dejagnu-siteexp-append.sh
blobb9a8f16a2fda517fa97e7882ea53227f142ce190
1 #! /bin/sh
2 # Copyright (C) 2011-2024 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 <https://www.gnu.org/licenses/>.
17 # Check that the files in $(EXTRA_DEJAGNU_SITE_CONFIG) get appended to
18 # site.exp in the same order in which they're listed in that variable.
20 . test-init.sh
22 cat >> configure.ac << 'END'
23 AC_OUTPUT
24 END
26 cat > Makefile.am << 'END'
27 AUTOMAKE_OPTIONS = dejagnu
28 DEJATOOL = tool
29 END
31 $ACLOCAL
32 $AUTOCONF
33 $AUTOMAKE --add-missing
35 ./configure
37 $MAKE site.exp
38 sed '/^##.*##$/d' site.exp > expected
40 cat > foo.exp << 'END'
41 foo1
42 foo2
43 foo3
44 END
46 cat foo.exp - >> expected << 'END'
47 BAR 1
48 # foo
49 BAR 2
50 END
52 cat >> Makefile.am << 'END'
53 EXTRA_DEJAGNU_SITE_CONFIG = foo.exp bar.exp
54 bar.exp:
55 @(echo 'BAR 1' && echo '# foo' && echo 'BAR 2') > $@
56 END
58 $AUTOMAKE Makefile
59 ./config.status Makefile
61 rm -f site.exp
62 $MAKE site.exp
63 sed '/^##.*##$/d' site.exp > obtained
65 cat expected
66 cat site.exp
68 diff expected obtained