Change 17657: Minor test fixes

[email protected] (Chris Nandor) Mon, 29 Jul 2002 15:55:24 -0400
Newsgroups perl.perl5.changes.mac
Message-ID <p05111b15b96b4e252f31@[10.0.1.177]>
Change 17657 by pudge@pudge-mobile on 2002/07/29 18:17:54

	Minor test fixes

Affected files ...

.... //depot/maint-5.6/macperl/t/lib/filespec.t#4 edit
.... //depot/maint-5.6/macperl/t/op/magic.t#4 edit

Differences ...

==== //depot/maint-5.6/macperl/t/lib/filespec.t#4 (xtext) ====
Index: macperl/t/lib/filespec.t
--- macperl/t/lib/filespec.t#3~12583~	Mon Oct 22 12:26:00 2001
+++ macperl/t/lib/filespec.t	Mon Jul 29 11:17:54 2002
@@ -3,6 +3,9 @@
 BEGIN {
     chdir 't' if -d 't';
     @INC = '../lib';
+    if ($^O eq 'MacOS') {
+	push @INC, "::lib:$MacPerl::Architecture";
+    }
 }
 # Grab all of the plain routines from File::Spec
 use File::Spec @File::Spec::EXPORT_OK ;
@@ -37,7 +40,6 @@
 # tests are skipped on other OSs
 my $root;
 if ($^O eq 'MacOS') {
-	push @INC, "::lib:$MacPerl::Architecture";
 	$root = File::Spec::Mac->rootdir();
 }
 

==== //depot/maint-5.6/macperl/t/op/magic.t#4 (xtext) ====
Index: macperl/t/op/magic.t
--- macperl/t/op/magic.t#3~17651~	Mon Jul 22 20:24:35 2002
+++ macperl/t/op/magic.t	Mon Jul 29 11:17:54 2002
@@ -186,8 +186,8 @@
 
     local $ENV{PATH}= ".";
     (my $script_name = $script) =~ s/.*(show-shebang)/$1/;
-    $s1 = "\$^X is $perl, \$0 is $script_name\n" if $Is_MSWin32;
-    $_ = `$script_name`;
+    $s1 = "\$^X is $perl, \$0 is $script_name\n" if $Is_MSWin32 || $Is_MacOS;
+    $_ = $Is_MacOS ? `$perl $script_name` : `$script_name`;
     s/\.exe//i if $Is_Dos or $Is_Cygwin or $Is_os2;
     s{\bminiperl\b}{perl}; # so that test doesn't fail with miniperl
     s{is perl}{is $perl}; # for systems where $^X is only a basename
End of Patch.
-- 
Chris Nandor                      [email protected]    http://pudge.net/
Open Source Development Network    [email protected]     http://osdn.com/