diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-07-17 14:43:49 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-07-17 14:43:49 +0000 |
commit | 6664971e98a4898e7ad9ca96f1bab0be1ac99541 (patch) | |
tree | bc82ec47b89f12acd2918d8196358054d1c4468a | |
parent | cbe9e2031df1ef1fc18849ffe4581d788a72931d (diff) | |
download | perl-6664971e98a4898e7ad9ca96f1bab0be1ac99541.tar.gz |
Integrate change #17588 from macperl:
Small test fixes for Mac OS
$Config{cc} is generated dynamically on MacPerl,
so looking at raw config_sh() fails
op/glob.t never worked before, oops :-)
p4raw-link: @17588 on //depot/macperl: 7fdc85a41049dbfd266b46a271bdc2992d732831
p4raw-id: //depot/perl@17602
p4raw-integrated: from //depot/macperl@17601 'copy in' lib/Config.t
t/op/glob.t (@17528..)
-rw-r--r-- | lib/Config.t | 5 | ||||
-rwxr-xr-x | t/op/glob.t | 20 |
2 files changed, 20 insertions, 5 deletions
diff --git a/lib/Config.t b/lib/Config.t index c47519bc26..afc3c4a41c 100644 --- a/lib/Config.t +++ b/lib/Config.t @@ -42,7 +42,10 @@ ok(exists $Config{ccflags_nolargefiles}, "has ccflags_nolargefiles"); like(Config::myconfig(), qr/cc='$Config{cc}'/, "myconfig"); -like(Config::config_sh(), qr/cc='$Config{cc}'/, "config_sh"); +SKIP: { + skip "cc is tied in $^O", 1 if $^O eq 'MacOS'; + like(Config::config_sh(), qr/cc='$Config{cc}'/, "config_sh"); +} my $out = tie *STDOUT, 'FakeOut'; diff --git a/t/op/glob.t b/t/op/glob.t index 68f5850003..d03d75fc43 100755 --- a/t/op/glob.t +++ b/t/op/glob.t @@ -17,6 +17,11 @@ elsif ($^O eq 'VMS') { map { $files{lc($_)}++ } <[.op]*>; map { s/;.*$//; delete $files{lc($_)}; } split /[\n]/, `directory/noheading/notrailing/versions=1 [.op]`, } +elsif ($^O eq 'MacOS') { + @oops = @ops = <:op:*>; + map { $files{$_}++ } <:op:*>; + map { delete $files{$_} } split /[\s\n]/, `echo :op:\xc5`; +} else { map { $files{$_}++ } <op/*>; map { delete $files{$_} } split /[\s\n]/, `echo op/*`; @@ -27,16 +32,23 @@ if (keys %files) { print $/ eq "\n" ? "ok 2\n" : "not ok 2\n"; -while (<jskdfjskdfj* op/* jskdjfjkosvk*>) { - $not = "not " unless $_ eq shift @ops; - $not = "not at all " if $/ eq "\0"; +if ($^O eq 'MacOS') { + while (<jskdfjskdfj* :op:* jskdjfjkosvk*>) { + $not = "not " unless $_ eq shift @ops; + $not = "not at all " if $/ eq "\0"; + } +} else { + while (<jskdfjskdfj* op/* jskdjfjkosvk*>) { + $not = "not " unless $_ eq shift @ops; + $not = "not at all " if $/ eq "\0"; + } } print "${not}ok 3\n"; print $/ eq "\n" ? "ok 4\n" : "not ok 4\n"; # test the "glob" operator -$_ = "op/*"; +$_ = $^O eq 'MacOS' ? ":op:*" : "op/*"; @glops = glob $_; print "@glops" eq "@oops" ? "ok 5\n" : "not ok 5\n"; |