test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / tap-no-disable-hard-error.sh
1 #! /bin/sh
2 # Copyright (C) 2011-2013 Free Software Foundation, Inc.
3 #
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.
8 #
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.
13 #
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/>.
16
17 # TAP support:
18 #  - "Bail out!" magic and TAP parse errors are not disabled nor turned
19 #    into simple failures by the definition DISABLE_HARD_ERRORS.
20
21 . test-init.sh
22
23 cat > Makefile.am << 'END'
24 DISABLE_HARD_ERRORS = yes
25 TEST_LOG_COMPILER = cat
26 TESTS = bail.test few.test noplan.test
27 END
28
29 . tap-setup.sh
30
31 cat > bail.test <<END
32 1..1
33 Bail out!
34 END
35
36 cat > few.test <<END
37 1..1
38 END
39
40 cat > noplan.test <<END
41 # nothing here
42 END
43
44 run_make -O -e FAIL check
45 count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=3
46
47 :