summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
authorCharles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU>1996-10-01 16:37:03 -0400
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1996-10-01 16:37:03 -0400
commitadbc4883981bd72668d5f916aaa743a7ff6c8c71 (patch)
tree811e03ff0a2964c82f8e072bf9e48bfa29157ca8 /t/op
parent7503907883139811f2402655acdc3b8f953dd834 (diff)
downloadperl-adbc4883981bd72668d5f916aaa743a7ff6c8c71.tar.gz
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 <op/*> 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.
Diffstat (limited to 't/op')
-rwxr-xr-xt/op/glob.t9
1 files changed, 5 insertions, 4 deletions
diff --git a/t/op/glob.t b/t/op/glob.t
index b4038442bd..fce2952968 100755
--- a/t/op/glob.t
+++ b/t/op/glob.t
@@ -5,11 +5,12 @@
print "1..4\n";
@ops = <op/*>;
-$list = join(' ',@ops);
-chop($otherway = `echo op/*`);
-
-print $list eq $otherway ? "ok 1\n" : "not ok 1\n$list\n$otherway\n";
+map { $files{$_}++ } <op/*>;
+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";