From 09e9d5e47f83a3953e51e2b3d0e4b85fd411f8d1 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Mon, 10 Dec 2018 12:04:21 +1100 Subject: * testsuite/runtest.all/utils.test: ${srcdir} -> $srcdir. --- ChangeLog | 2 ++ testsuite/runtest.all/utils.test | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3a06cdb..b3b6391 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2018-12-10 Ben Elliston + * testsuite/runtest.all/utils.test: ${srcdir} -> $srcdir. + * lib/utils.exp (getdirs): Use glob -nocomplain rather than glob and catching the "no files matched glob pattern" error message. Catching the error message was the wrong thing to do diff --git a/testsuite/runtest.all/utils.test b/testsuite/runtest.all/utils.test index 2bf4869..62d1a56 100644 --- a/testsuite/runtest.all/utils.test +++ b/testsuite/runtest.all/utils.test @@ -26,19 +26,19 @@ if [ file exists $file] { # run_tests [subst { { lib_pat_test getdirs - {[file join ${srcdir} runtest.all]} - [file join ${srcdir} runtest.all topdir] + {[file join $srcdir runtest.all]} + [file join $srcdir runtest.all topdir] "getdirs toplevel, no arguments" } { lib_pat_test getdirs - {[file join ${srcdir} runtest.all] "top*"} - [file join ${srcdir} runtest.all topdir] + {[file join $srcdir runtest.all] "top*"} + [file join $srcdir runtest.all topdir] "getdirs toplevel, one subdir" } { lib_pat_test getdirs - {[file join ${srcdir} runtest.all topdir]} + {[file join $srcdir runtest.all topdir]} "*topdir*subdir\[12\]*topdir*subdir\[12\]" "getdirs toplevel, two subdirs" } { lib_pat_test getdirs - {[file join ${srcdir} runtest.all nothere]} + {[file join $srcdir runtest.all nothere]} "" "getdirs toplevel, non-existent subdir"} }] @@ -60,11 +60,11 @@ run_tests { # run_tests [subst { { lib_pat_test find - {[file join ${srcdir} runtest.all topdir subdir2] "sub*"} + {[file join $srcdir runtest.all topdir subdir2] "sub*"} "*/subdir2/subfile2" "find, only one level deep" } { lib_regexp_test find - {[file join ${srcdir} runtest.all topdir subdir1] "sub*"} + {[file join $srcdir runtest.all topdir subdir1] "sub*"} ".*/subdir1/subsubdir1/subsubfile1( |$)" "find, two levels deep" } }] @@ -142,14 +142,14 @@ if {[which make] != 0} { ### depends on it. # Test grep! -if {[llength [grep ${srcdir}/runtest.all/utils.test "^# Test grep!"]] == 1} { +if {[llength [grep $srcdir/runtest.all/utils.test "^# Test grep!"]] == 1} { pass "grep, no options" } else { fail "grep, no options" } # Test grep with line option. -set result [grep ${srcdir}/runtest.all/utils.test "^# Test grep!" line] +set result [grep $srcdir/runtest.all/utils.test "^# Test grep!" line] if {[llength $result] == 1 && [regexp {^\d+ # Test grep!} [lindex $result 0]]} { pass "grep, line option" } else { @@ -157,7 +157,7 @@ if {[llength $result] == 1 && [regexp {^\d+ # Test grep!} [lindex $result 0]]} { } # Test grep with -n option. -set result [grep -n ${srcdir}/runtest.all/utils.test "^# Test grep!"] +set result [grep -n $srcdir/runtest.all/utils.test "^# Test grep!"] if {[llength $result] == 1 && [regexp {^\d+ # Test grep!} [lindex $result 0]]} { pass "grep, -n option" } else { -- cgit v1.1