aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDominik Vogt <vogt@linux.vnet.ibm.com>2016-03-28 17:31:07 +1100
committerBen Elliston <bje@gnu.org>2016-03-28 17:31:07 +1100
commit569f8718b534a2cd9511a7d640352eb0126ff492 (patch)
tree8cbe994086828265a274bbb8b62f0e87b48564b1 /lib
parent3e509af89efb558191517fb918538b74efcfa17c (diff)
* dg.exp (dg-do): Do not change the previously selected action if
a de-selected dg-do is encountered. Signed-off-by: Ben Elliston <bje@gnu.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/dg.exp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/dg.exp b/lib/dg.exp
index 7a9f287..6a54b46 100644
--- a/lib/dg.exp
+++ b/lib/dg.exp
@@ -298,6 +298,7 @@ proc dg-do { args } {
error "[lindex $args 0]: too many arguments"
}
+ set doaction [lindex $args 1]
set selected [lindex ${do-what} 1] ;# selected? (""/S/N)
set expected [lindex ${do-what} 2] ;# expected to pass/fail (P/F)
@@ -315,6 +316,8 @@ proc dg-do { args } {
# are OR'd together).
if { $selected != "S" } {
set selected "N"
+ } else {
+ set doaction [lindex ${do-what} 0]
}
}
"F" { set expected "F" }
@@ -340,7 +343,7 @@ proc dg-do { args } {
error "[lindex $args 0]: syntax error"
}
}
- set do-what [list [lindex $args 1] $selected $expected]
+ set do-what [list $doaction $selected $expected]
}
proc dg-error { args } {