* runtest.exp: Use 'array exists' for testing array existence
authorBen Elliston <bje@gnu.org>
Mon, 28 Mar 2016 00:53:58 +0000 (11:53 +1100)
committerBen Elliston <bje@gnu.org>
Mon, 28 Mar 2016 00:53:58 +0000 (11:53 +1100)
rather than 'info exists'.

ChangeLog
runtest.exp

index e370ce7..cd21a92 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2016-03-28  Ben Elliston  <bje@gnu.org>
 
+       * runtest.exp: Use 'array exists' for testing array existence
+       rather than 'info exists'.
+
+2016-03-28  Ben Elliston  <bje@gnu.org>
+
        * runtest.exp: Fixes identified by the Frink static analyser:
          (1) use -- in switch commands for safety,
          (2) remove unreachable return commands after error commands,
index 6ec5e23..56865c2 100644 (file)
@@ -1750,7 +1750,7 @@ foreach current_target $target_list {
        }
        verbose "Top level testsuite dirs are ${test_top_dirs}" 2
        set testlist ""
-       if {[info exists all_runtests]} {
+       if {[array exists all_runtests]} {
            foreach x [array names all_runtests] {
                verbose "trying to glob ${srcdir}/${x}" 2
                set s [glob -nocomplain ${srcdir}/$x]
@@ -1876,7 +1876,7 @@ foreach current_target $target_list {
                        # Check to see if the range of tests is limited,
                        # set `runtests' to a list of two elements: the script name
                        # and any arguments ("" if none).
-                       if {[info exists all_runtests]} {
+                       if {[array exists all_runtests]} {
                            verbose "searching for $test_name in [array names all_runtests]"
                            if { 0 > [lsearch [array names all_runtests] [file tail $test_name]]} {
                                if { 0 > [lsearch [array names all_runtests] $test_name] } {