Tweak to hints/machten.sh: stop t/lib/complex.t from failing
[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
adbc4883 9map { $files{$_}++ } <op/*>;
68dc0745 10if ($^O eq 'MSWin32') {
11 map { delete $files{"op/$_"} } split /[\s\n]/, `cmd /c "dir /b /l op"`;
12}
13else {
14 map { delete $files{$_} } split /[\s\n]/, `echo op/*`;
15}
adbc4883 16if (keys %files) {
17 print "not ok 1\t(",join(' ', sort keys %files),"\n";
18} else { print "ok 1\n"; }
a687059c 19
20print $/ eq "\n" ? "ok 2\n" : "not ok 2\n";
21
fe14fcc3 22while (<jskdfjskdfj* op/* jskdjfjkosvk*>) {
a687059c 23 $not = "not " unless $_ eq shift @ops;
24 $not = "not at all " if $/ eq "\0";
25}
26print "${not}ok 3\n";
27
28print $/ eq "\n" ? "ok 4\n" : "not ok 4\n";
0a753a76 29
30# test the "glob" operator
31$_ = "op/*";
32@glops = glob $_;
33print "@glops" eq "@oops" ? "ok 5\n" : "not ok 5\n";
34
35@glops = glob;
36print "@glops" eq "@oops" ? "ok 6\n" : "not ok 6\n";