1 # Copyright (C) 1995-2016, 2018, 2020 Free Software Foundation, Inc.
3 # This file is part of DejaGnu.
5 # DejaGnu is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # DejaGnu is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with DejaGnu; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19 # This file tests handling of fatal errors in testcases.
20 # The way we do this is to recursively invoke ourselves on a small testsuite
21 # and analyze the results.
23 load_lib util-defs.exp
25 runtest_setup_nested_testsuite
28 { "run only simple test"
31 *expected passes\[ \t\]+1\n" }
32 { "continue after divide-by-zero, reporting error"
33 "error-dbz.exp simple.exp"
34 "PASS: running error-dbz.exp.*\
35 *UNRESOLVED: .* aborted.*\
37 *expected passes\[ \t\]+2\n.*unresolved testcases\[ \t\]+1\n" }
38 { "continue after auto-loaded divide-by-zero, reporting error"
39 "error-al-dbz.exp simple.exp"
40 "PASS: running error-al-dbz.exp.*\
41 *UNRESOLVED: .* aborted.*\
43 *expected passes\[ \t\]+2\n.*unresolved testcases\[ \t\]+1\n" }
44 { "continue after calling undefined procedure, reporting error"
45 "error-undef.exp simple.exp"
46 "PASS: running error-undef.exp.*\
47 *UNRESOLVED: .* aborted.*\
49 *expected passes\[ \t\]+2\n.*unresolved testcases\[ \t\]+1\n" }
53 if [util_test $RUNTEST \
54 "--local_init nested-init.exp --tool error\
64 runtest_cleanup_nested_testsuite
66 # remove the autoload files generated during the test
68 [testsuite file -object -test nested testsuite error.test lib]