11 @oops = @ops = <op/*>;
13 if ($^O eq 'MSWin32') {
14 map { $files{lc($_)}++ } <op/*>;
15 map { delete $files{"op/$_"} } split /[\s\n]/, `dir /b /l op & dir /b /l /ah op 2>nul`,
17 elsif ($^O eq 'VMS') {
18 map { $files{lc($_)}++ } <[.op]*>;
19 map { s/;.*$//; delete $files{lc($_)}; } split /[\n]/, `directory/noheading/notrailing/versions=1 [.op]`,
21 elsif ($^O eq 'MacOS') {
22 @oops = @ops = <:op:*>;
23 map { $files{$_}++ } <:op:*>;
24 map { delete $files{$_} } split /[\s\n]/, `echo :op:\xc5`;
27 map { $files{$_}++ } <op/*>;
28 map { delete $files{$_} } split /[\s\n]/, `echo op/*`;
30 ok( !(keys(%files)),'leftover op/* files' ) or diag(join(' ',sort keys %files));
32 cmp_ok($/,'eq',"\n",'sane input record separator');
36 while (<jskdfjskdfj* :op:* jskdjfjkosvk*>) {
37 $not = "not " unless $_ eq shift @ops;
38 $not = "not at all " if $/ eq "\0";
41 while (<jskdfjskdfj* op/* jskdjfjkosvk*>) {
42 $not = "not " unless $_ eq shift @ops;
43 $not = "not at all " if $/ eq "\0";
46 ok(!$not,"glob amid garbage [$not]");
48 cmp_ok($/,'eq',"\n",'input record separator still sane');
50 $_ = $^O eq 'MacOS' ? ":op:*" : "op/*";
52 cmp_ok("@glops",'eq',"@oops",'glob operator 1');
55 cmp_ok("@glops",'eq',"@oops",'glob operator 2');
57 # glob should still work even after the File::Glob stash has gone away
58 # (this used to dump core)
62 ok(!length($@),"eval'ed a glob $_");
66 cmp_ok($i,'==',2,'remore File::Glob stash');
68 # ... while ($var = glob(...)) should test definedness not truth
71 skip('no File::Glob to emulate Unix-ism', 1)
72 unless $INC{'File/Glob.pm'};
74 $ok = 1 while my $var = glob("0");
75 ok($ok,'define versus truth');
78 # The formerly-broken test for the situation above would accidentally
79 # test definedness for an assignment with a LOGOP on the right:
83 $ok = 0, undef $f while $x = $f||$f;
84 ok($ok,'test definedness with LOGOP');
87 cmp_ok(scalar(@oops),'>',0,'glob globbed something');
90 pass('Can assign integers to typeglobs');
92 pass('Can assign floats to typeglobs');
94 pass('Can assign strings to typeglobs');