summaryrefslogtreecommitdiff
path: root/t/op/anonsub.t
diff options
context:
space:
mode:
Diffstat (limited to 't/op/anonsub.t')
-rwxr-xr-xt/op/anonsub.t11
1 files changed, 7 insertions, 4 deletions
diff --git a/t/op/anonsub.t b/t/op/anonsub.t
index 17889d9d2f..aa25de0131 100755
--- a/t/op/anonsub.t
+++ b/t/op/anonsub.t
@@ -4,6 +4,7 @@ chdir 't' if -d 't';
@INC = '../lib';
$Is_VMS = $^O eq 'VMS';
$Is_MSWin32 = $^O eq 'MSWin32';
+$Is_MacOS = $^O eq 'MacOS';
$ENV{PERL5LIB} = "../lib" unless $Is_VMS;
$|=1;
@@ -26,10 +27,12 @@ for (@prgs){
print TEST "$prog\n";
close TEST;
my $results = $Is_VMS ?
- `MCR $^X "-I[-.lib]" $switch $tmpfile 2>&1` :
- $Is_MSWin32 ?
- `.\\perl -I../lib $switch $tmpfile 2>&1` :
- `./perl $switch $tmpfile 2>&1`;
+ `MCR $^X "-I[-.lib]" $switch $tmpfile 2>&1` :
+ $Is_MSWin32 ?
+ `.\\perl -I../lib $switch $tmpfile 2>&1` :
+ $Is_MacOS ?
+ `$^X -I::lib $switch $tmpfile` :
+ `./perl $switch $tmpfile 2>&1`;
my $status = $?;
$results =~ s/\n+$//;
# allow expected output to be written as if $prog is on STDIN