diff options
author | Ben Elliston <bje@gnu.org> | 2011-03-01 21:19:29 +1100 |
---|---|---|
committer | Ben Elliston <bje@gnu.org> | 2011-03-01 21:19:29 +1100 |
commit | fd708571bd2853ea9ad8fcf15b22c0a71b57cd3a (patch) | |
tree | a5c21922fc6821f8662d8d951f7c16cba75d8b80 /lib/dg.exp | |
parent | 3589f41bba1f8df1f2f3e2a6fba7bc2674fb5778 (diff) | |
download | dejagnu-fd708571bd2853ea9ad8fcf15b22c0a71b57cd3a.zip dejagnu-fd708571bd2853ea9ad8fcf15b22c0a71b57cd3a.tar.gz dejagnu-fd708571bd2853ea9ad8fcf15b22c0a71b57cd3a.tar.bz2 |
2011-03-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* lib/dg.exp (dg-test): Support nested calls.
Diffstat (limited to 'lib/dg.exp')
-rw-r--r-- | lib/dg.exp | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -671,10 +671,11 @@ proc dg-test { args } { # Define our own "special function" `unknown' so we catch spelling errors. # But first rename the existing one so we can restore it afterwards. - catch {rename dg-save-unknown ""} - rename unknown dg-save-unknown - proc unknown { args } { - return -code error "unknown dg option: $args" + if { [info procs dg-save-unknown] == [list] } { + rename unknown dg-save-unknown + proc unknown { args } { + return -code error "unknown dg option: $args" + } } set tmp [dg-get-options $prog] @@ -698,8 +699,10 @@ proc dg-test { args } { } # Restore normal error handling. - rename unknown "" - rename dg-save-unknown unknown + if { [info procs dg-save-unknown] != [list] } { + rename unknown "" + rename dg-save-unknown unknown + } # If we're not supposed to try this test on this target, we're done. if { [lindex ${dg-do-what} 1] == "N" } { |