#! /bin/sh
# Copyright (C) 2011-2021 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 .
# Check that we can override the "Testsuite summary" header line,
# per bug#11745.
. test-lib.sh
use_colors=no; use_vpath=no
. testsuite-summary-checks.sh
./configure
# Cut down from do_check in ax/testsuite-summary-checks.sh
# so that we can pass a make variable setting in $1.
#
do_header_check ()
{
cat > summary.exp
run_make -O -e IGNORE check "$1"
test $am_make_rc -eq 0 || exit 1
$PERL "$am_testaux_srcdir"/extract-testsuite-summary.pl stdout >summary.got \
|| fatal_ "cannot extract testsuite summary"
cat summary.exp
cat summary.got
compare=diff
$compare summary.exp summary.got || exit 1
}
# We don't actually run any tests, only interested in the header line.
results="\
# TOTAL: 0
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0"
#
success_footer=${br}
# Check the default.
header="\
${br}
Testsuite summary for GNU AutoFoo 7.1
${br}"
#
do_header_check 'junkvar=junkval' <