diff options
author | Ben Elliston <bje@gnu.org> | 2018-12-06 18:05:05 +1100 |
---|---|---|
committer | Ben Elliston <bje@gnu.org> | 2018-12-06 18:05:05 +1100 |
commit | d439887f64b9c7c146d9a9062b459d08c43f2a12 (patch) | |
tree | 2a2921cdef799eb805e6ec027ed258bbf72deec3 /lib/dg.exp | |
parent | a8e4dbd2a65255a1470962994b2888fc8ee3b9bc (diff) | |
download | dejagnu-d439887f64b9c7c146d9a9062b459d08c43f2a12.zip dejagnu-d439887f64b9c7c146d9a9062b459d08c43f2a12.tar.gz dejagnu-d439887f64b9c7c146d9a9062b459d08c43f2a12.tar.bz2 |
* runtest.exp: Replace [string match] commands involving literal
strings and variables known to not be Tcl glob patterns with eq
and ne.
* config/unix.exp: Likewise.
* lib/debugger.exp: Likewise.
* lib/dg.exp: Likewise.
* lib/framework.exp: Likewise.
* lib/remote.exp: Likewise.
* lib/utils.exp: Likewise.
* baseboards/androideabi.exp: Likewise.
* baseboards/multi-sim.exp: Likewise.
* testsuite/lib/util-defs.exp: Likewise.
* testsuite/runtest.all/config.test: Likewise.
Diffstat (limited to 'lib/dg.exp')
-rw-r--r-- | lib/dg.exp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -186,7 +186,7 @@ proc dg-get-options { prog } { set result "" set tmp [grep $prog "{\[ \t\]\+dg-\[-a-z\]\+\[ \t\]\+.*\[ \t\]\+}" line] - if {![string match "" $tmp]} { + if {$tmp ne ""} { foreach i $tmp { regexp "(\[0-9\]+)\[ \t\]+{\[ \t\]+(dg-\[-a-z\]+)\[ \t\]+(.*)\[ \t\]+}\[^\}\]*(\n|$)" $i i line cmd args append result " { $cmd $line $args }" @@ -783,7 +783,7 @@ proc dg-test { args } { if {${dg-excess-errors-flag}} { setup_xfail "*-*-*" } - if {![string match "" $comp_output]} { + if {$comp_output ne ""} { fail "$name (test for excess errors)" send_log "Excess errors:\n$comp_output\n" } else { @@ -842,7 +842,7 @@ proc dg-test { args } { # of the program can be delayed until here. Ditto for other situations. # It would be a bit cumbersome though. - if {![string match ${dg-final-code} ""]} { + if {${dg-final-code} ne ""} { regsub -all "\\\\(\[{}\])" ${dg-final-code} "\\1" dg-final-code # Note that the use of `args' here makes this a varargs proc. proc dg-final-proc { args } ${dg-final-code} @@ -879,7 +879,7 @@ proc dg-finish { } { # There may be a bit of duplication (eg: resetting prms_id), leave it. # Let's keep these procs robust. global tool - if {![string match "" [info procs ${tool}_finish]]} { + if {[info procs ${tool}_finish] ne ""} { ${tool}_finish } } |