From 9664d9f6280dd2f5ca00dffbbdacb69f45257aa5 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Wed, 3 Dec 2003 04:24:32 +0000 Subject: [PATCH] Merge from DejaGnu 1.4 branch: * testsuite/runtest.all/utils.test: Fix a test for proc find which assumed that "subsubfile1" would appear at the end of the returned list. Adjust to use a more robust regular expression. --- ChangeLog | 6 ++++++ testsuite/runtest.all/utils.test | 13 +------------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 883bd17..ab3edd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-12-03 Ben Elliston + + * testsuite/runtest.all/utils.test: Fix a test for proc find which + assumed that "subsubfile1" would appear at the end of the returned + list. Adjust to use a more robust regular expression. + 2003-10-16 Rob Savoye * packaging/prototype: Remove sh-hms-sim.exp, add sh-sim. diff --git a/testsuite/runtest.all/utils.test b/testsuite/runtest.all/utils.test index ee08306..c85d69d 100644 --- a/testsuite/runtest.all/utils.test +++ b/testsuite/runtest.all/utils.test @@ -50,10 +50,7 @@ if [string match "*/subdir2/subfile2" "[find ${srcdir}/runtest.all/topdir/subdir puts "FAILED: find, only one level deep" } -#set path ${srcdir}/runtest.all/topdir/subdir1 -#exp_test "find ${path} sub*" "Adding */subdir1/subsubdir1/subsubfile1" "find, two levels deep" - -if [string match "*/subdir1/subsubdir1/subsubfile1" "[find ${srcdir}/runtest.all/topdir/subdir1 sub*]"] { +if [regexp ".*/subdir1/subsubdir1/subsubfile1( |$)" "[find ${srcdir}/runtest.all/topdir/subdir1 sub*]"] { puts "PASSED: find, two levels deep" } else { puts "FAILED: find, two levels deep" @@ -108,11 +105,3 @@ if [info exists env(TESTRUN)] { # absolute path # psource file # diff file_1 file_2 - - - - - - - - -- 2.7.4