aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--testsuite/report-card.all/onetest.exp14
2 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 1544385..232db1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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"