Change 17588: Small test fixes for Mac OS
[email protected] (Chris Nandor) Wed, 17 Jul 2002 11:37:11 -0400
| Newsgroups | perl.perl5.changes.mac |
|---|---|
| Message-ID | <p05111b0db95b3fa2bb65@[10.0.1.177]> |
Change 17588 by pudge@pudge-mobile on 2002/07/17 11:28:02
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 :-)
Affected files ...
.... //depot/macperl/lib/Config.t#2 edit
.... //depot/macperl/t/op/glob.t#3 edit
Differences ...
==== //depot/macperl/lib/Config.t#2 (text) ====
Index: macperl/lib/Config.t
--- macperl/lib/Config.t#1~17528~ Sun Jul 14 05:07:17 2002
+++ macperl/lib/Config.t Wed Jul 17 04:28:02 2002
@@ -42,7 +42,10 @@
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';
==== //depot/macperl/t/op/glob.t#3 (xtext) ====
Index: macperl/t/op/glob.t
--- macperl/t/op/glob.t#2~17528~ Sun Jul 14 05:07:17 2002
+++ macperl/t/op/glob.t Wed Jul 17 04:28:02 2002
@@ -17,6 +17,11 @@
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 @@
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";
End of Patch.