[PATCH 5.004_65] Config_65-02-03.diff: SunOS and Solaris hints
[p5sagit/p5-mst-13.2.git] / t / op / glob.t
CommitLineData
a687059c 1#!./perl
2
79072805 3# $RCSfile: glob.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:55 $
a687059c 4
0a753a76 5print "1..6\n";
a687059c 6
0a753a76 7@oops = @ops = <op/*>;
a687059c 8
68dc0745 9if ($^O eq 'MSWin32') {
3cd616b9 10 map { $files{lc($_)}++ } <op/*>;
11 map { delete $files{"op/$_"} } split /[\s\n]/, `cmd /c "dir /b /l op & dir /b /l /ah op 2>nul"`,
68dc0745 12}
13else {
3cd616b9 14 map { $files{$_}++ } <op/*>;
68dc0745 15 map { delete $files{$_} } split /[\s\n]/, `echo op/*`;
16}
adbc4883 17if (keys %files) {
18 print "not ok 1\t(",join(' ', sort keys %files),"\n";
19} else { print "ok 1\n"; }
a687059c 20
21print $/ eq "\n" ? "ok 2\n" : "not ok 2\n";
22
fe14fcc3 23while (<jskdfjskdfj* op/* jskdjfjkosvk*>) {
a687059c 24 $not = "not " unless $_ eq shift @ops;
25 $not = "not at all " if $/ eq "\0";
26}
27print "${not}ok 3\n";
28
29print $/ eq "\n" ? "ok 4\n" : "not ok 4\n";
0a753a76 30
31# test the "glob" operator
32$_ = "op/*";
33@glops = glob $_;
34print "@glops" eq "@oops" ? "ok 5\n" : "not ok 5\n";
35
36@glops = glob;
37print "@glops" eq "@oops" ? "ok 6\n" : "not ok 6\n";