[inseparable changes from match from perl-5.003_93 to perl-5.003_94]
[p5sagit/p5-mst-13.2.git] / t / op / glob.t
1 #!./perl
2
3 # $RCSfile: glob.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:55 $
4
5 print "1..6\n";
6
7 @oops = @ops = <op/*>;
8
9 map { $files{$_}++ } <op/*>;
10 if ($^O eq 'MSWin32') {
11   map { delete $files{"op/$_"} } split /[\s\n]/, `cmd /c "dir /b /l op"`;
12 }
13 else {
14   map { delete $files{$_} } split /[\s\n]/, `echo op/*`;
15 }
16 if (keys %files) {
17         print "not ok 1\t(",join(' ', sort keys %files),"\n";
18 } else { print "ok 1\n"; }
19
20 print $/ eq "\n" ? "ok 2\n" : "not ok 2\n";
21
22 while (<jskdfjskdfj* op/* jskdjfjkosvk*>) {
23     $not = "not " unless $_ eq shift @ops;
24     $not = "not at all " if $/ eq "\0";
25 }
26 print "${not}ok 3\n";
27
28 print $/ eq "\n" ? "ok 4\n" : "not ok 4\n";
29
30 # test the "glob" operator
31 $_ = "op/*";
32 @glops = glob $_;
33 print "@glops" eq "@oops" ? "ok 5\n" : "not ok 5\n";
34
35 @glops = glob;
36 print "@glops" eq "@oops" ? "ok 6\n" : "not ok 6\n";