2 # Copyright (C) 2011-2012 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/>.
18 # - option '--diagnostic-string' to customize the string introducing
26 cat >> configure.ac <<END
30 cat > Makefile.am << 'END'
31 my_log_driver = $(srcdir)/tap-driver
39 # Quoting our comments below is an hack required to keep
40 # comments near the things they refer to.
47 '## A non-alphabetic character' \
49 '## Some metacharacters (we need to repeat the "$" for make)' \
51 '## A whitespace character' \
53 '## A tab character' \
55 '## A string with more whitespace' \
56 " ${tab}a b${tab} c" \
57 '## Note the we do not have the empty string here. We prefer to' \
58 '## leave its behaviour in this context undefined for the moment.'
60 case $string in '##'*) continue;; esac
62 unindent >> Makefile.am << END
63 TEST_EXTENSIONS += .t$i
65 T${i}_LOG_COMPILER = \$(my_log_compiler)
66 T${i}_LOG_DRIVER = \$(my_log_driver)
67 AM_T${i}_LOG_DRIVER_FLAGS = \
69 --diagnostic-string '$string'
71 unindent > foo$i.t$i <<END
76 echo "AM_T${i}_LOG_DRIVER_FLAGS = --no-comments" >> later.mk
85 $MAKE check >stdout || { cat stdout; Exit 1; }
87 count_test_results total=$i pass=$i fail=0 xpass=0 xfail=0 skip=0 error=0
89 cat later.mk >> Makefile
90 $MAKE check >stdout || { cat stdout; Exit 1; }
92 $FGREP 'blah blah' stdout && Exit 1