From: Jarkko Hietaniemi Date: Wed, 17 Jul 2002 14:43:49 +0000 (+0000) Subject: Integrate change #17588 from macperl: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6664971e98a4898e7ad9ca96f1bab0be1ac99541;p=p5sagit%2Fp5-mst-13.2.git 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..) --- diff --git a/lib/Config.t b/lib/Config.t index c47519b..afc3c4a 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 68f5850..d03d75f 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{$_}++ } ; 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 () { - $not = "not " unless $_ eq shift @ops; - $not = "not at all " if $/ eq "\0"; +if ($^O eq 'MacOS') { + while () { + $not = "not " unless $_ eq shift @ops; + $not = "not at all " if $/ eq "\0"; + } +} else { + while () { + $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";