From: Charles Bailey Date: Tue, 1 Oct 1996 20:37:03 +0000 (-0400) Subject: Re: glob test 1 failing...bad test or bug X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=adbc4883981bd72668d5f916aaa743a7ff6c8c71;p=p5sagit%2Fp5-mst-13.2.git Re: glob test 1 failing...bad test or bug Under AIX 4.1.4, with LOCALE set en_GB (British english) glob test one fails because sorts op/re_* before op/rea*, while $otherway = `echo op/*` sorts op/re_* after op/re[a-z]*.t This version doesn't rely on the sorting order. --- diff --git a/t/op/glob.t b/t/op/glob.t index b403844..fce2952 100755 --- a/t/op/glob.t +++ b/t/op/glob.t @@ -5,11 +5,12 @@ print "1..4\n"; @ops = ; -$list = join(' ',@ops); -chop($otherway = `echo op/*`); - -print $list eq $otherway ? "ok 1\n" : "not ok 1\n$list\n$otherway\n"; +map { $files{$_}++ } ; +map { delete $files{$_} } split /[\s\n]/, `echo op/*`; +if (keys %files) { + print "not ok 1\t(",join(' ', sort keys %files),"\n"; +} else { print "ok 1\n"; } print $/ eq "\n" ? "ok 2\n" : "not ok 2\n";