From: Benjamin Sugars Date: Fri, 30 Mar 2001 11:04:35 +0000 (-0500) Subject: glob-basic.t (Was: [ID 20010328.016]) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=93782ce2b763fed21299361ef3e9d42bad896db2;p=p5sagit%2Fp5-mst-13.2.git glob-basic.t (Was: [ID 20010328.016]) Message-ID: p4raw-id: //depot/perl@9474 --- diff --git a/t/lib/glob-basic.t b/t/lib/glob-basic.t index 4670f7c..ec2f539 100755 --- a/t/lib/glob-basic.t +++ b/t/lib/glob-basic.t @@ -128,37 +128,39 @@ print "ok 9\n"; # GLOB_ALPHASORT (default) should sort alphabetically regardless of case mkdir "pteerslt", 0777; chdir "pteerslt"; -@f_ascii = qw(A.test B.test C.test a.test b.test c.test); -@f_alpha = qw(A.test a.test B.test b.test C.test c.test); -if (ord('A') == 193) { # EBCDIC char sets sort lower case before UPPER - @f_ascii = sort(@f_ascii); - @f_alpha = qw(a.test A.test b.test B.test c.test C.test); + +@f_names = qw(Ax.pl Bx.pl Cx.pl aY.pl bY.pl cY.pl); +@f_alpha = qw(Ax.pl aY.pl Bx.pl bY.pl Cx.pl cY.pl); +if ('a' lt 'A') { # EBCDIC char sets sort lower case before UPPER + @f_names = sort(@f_names); + @f_alpha = qw(aY.pl Ax.pl bY.pl Bx.pl cY.pl Cx.pl); } -for (@f_ascii) { + +for (@f_names) { open T, "> $_"; close T; } -$pat = "*.test"; + +$pat = "*.pl"; + $ok = 1; -@g_ascii = bsd_glob($pat, 0); -print "# f_ascii = @f_ascii\n"; -print "# g_ascii = @g_ascii\n"; -if (@g_ascii == 6) { - for (@f_ascii) { - $ok = 0 unless $_ eq shift @g_ascii; - } +@g_names = bsd_glob($pat, 0); +print "# f_names = @f_names\n"; +print "# g_names = @g_names\n"; +for (@f_names) { + $ok = 0 unless $_ eq shift @g_names; } print $ok ? "ok 10\n" : "not ok 10\n"; + $ok = 1; @g_alpha = bsd_glob($pat); print "# f_alpha = @f_alpha\n"; print "# g_alpha = @g_alpha\n"; -if (@g_ascii == 6) { - for (@f_alpha) { - $ok = 0 unless $_ eq shift @g_alpha; - } +for (@f_alpha) { + $ok = 0 unless $_ eq shift @g_alpha; } print $ok ? "ok 11\n" : "not ok 11\n"; -unlink @f_ascii; + +unlink @f_names; chdir ".."; rmdir "pteerslt";