diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | testsuite/report-card.all/onetest.exp | 14 |
2 files changed, 13 insertions, 4 deletions
@@ -1,5 +1,8 @@ 2021-05-18 Jacob Bachmeyer <jcb@gnu.org> + * testsuite/report-card.all/onetest.exp: Avoid Tcl error when item + and totals lines are missing entirely. + * testsuite/runtest.main/pr48155.exp: Fix assumption about exit code from /bin/false, which is different on Solaris. diff --git a/testsuite/report-card.all/onetest.exp b/testsuite/report-card.all/onetest.exp index b2ae814..fcebdf7 100644 --- a/testsuite/report-card.all/onetest.exp +++ b/testsuite/report-card.all/onetest.exp @@ -193,11 +193,17 @@ foreach name $test_names { } # skip the footer expect -re {.+} { exp_continue } - # do the item and totals lines match? - if { $item_line eq $totals_line } { - pass "verify total for $name" + # were item and totals lines even produced? + if { [info exists item_line] && [info exists totals_line] } { + # do the item and totals lines match? + if { $item_line eq $totals_line } { + pass "verify total for $name" + } else { + fail "verify total for $name" + } } else { - fail "verify total for $name" + # either an item line or the totals line was not seen + unresolved "verify total for $name" } if { $separator_count == 2 } { pass "expected separator lines for $name" |