diff options
author | Artur Bergman <sky@nanisky.com> | 2002-10-06 15:40:56 +0000 |
---|---|---|
committer | Artur Bergman <sky@nanisky.com> | 2002-10-06 15:40:56 +0000 |
commit | ac5e36916bf9bff6ce2594ce0b6db3ecde427ff6 (patch) | |
tree | 5635bb88328bfa015190fa282ab4d3943bee7e06 /ext/Safe | |
parent | f53a354e92987b335cad3861853390f76eef9be2 (diff) | |
download | perl-ac5e36916bf9bff6ce2594ce0b6db3ecde427ff6.tar.gz |
Upgrade Safe.pm to 2.09 after CPAN backport.
Fix testcases to run properly outside perl core build enviroment.
p4raw-id: //depot/perl@17980
Diffstat (limited to 'ext/Safe')
-rwxr-xr-x | ext/Safe/safe1.t | 7 | ||||
-rwxr-xr-x | ext/Safe/safe2.t | 8 | ||||
-rw-r--r-- | ext/Safe/safe3.t | 16 |
3 files changed, 18 insertions, 13 deletions
diff --git a/ext/Safe/safe1.t b/ext/Safe/safe1.t index 27993d95c9..6a3b9082e3 100755 --- a/ext/Safe/safe1.t +++ b/ext/Safe/safe1.t @@ -1,13 +1,16 @@ #!./perl -w $|=1; BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; + if($ENV{PERL_CORE}) { + chdir 't' if -d 't'; + @INC = '../lib'; + } require Config; import Config; if ($Config{'extensions'} !~ /\bOpcode\b/ && $Config{'osname'} ne 'VMS') { print "1..0\n"; exit 0; } + } # Tests Todo: diff --git a/ext/Safe/safe2.t b/ext/Safe/safe2.t index 94398d4565..3ea19eda4e 100755 --- a/ext/Safe/safe2.t +++ b/ext/Safe/safe2.t @@ -1,8 +1,10 @@ #!./perl -w $|=1; BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; + if($ENV{PERL_CORE}) { + chdir 't' if -d 't'; + @INC = '../lib'; + } require Config; import Config; if ($Config{'extensions'} !~ /\bOpcode\b/ && $Config{'osname'} ne 'VMS') { print "1..0\n"; @@ -38,7 +40,7 @@ $cpt = new Safe or die; $cpt = new Safe "Root"; $cpt->reval(q{ system("echo not ok 1"); }); -if ($@ =~ /^'system' trapped by operation mask/) { +if ($@ =~ /^'?system'? trapped by operation mask/) { print "ok 1\n"; } else { print "#$@" if $@; diff --git a/ext/Safe/safe3.t b/ext/Safe/safe3.t index 6265d146e3..2d5f275970 100644 --- a/ext/Safe/safe3.t +++ b/ext/Safe/safe3.t @@ -4,14 +4,14 @@ BEGIN { if ($ENV{PERL_CORE}) { chdir 't' if -d 't'; @INC = '../lib'; - require Config; import Config; - if ($Config{'extensions'} !~ /\bOpcode\b/ - && $Config{'extensions'} !~ /\bPOSIX\b/ - && $Config{'osname'} ne 'VMS') - { - print "1..0\n"; - exit 0; - } + } + require Config; import Config; + if ($Config{'extensions'} !~ /\bOpcode\b/ + && $Config{'extensions'} !~ /\bPOSIX\b/ + && $Config{'osname'} ne 'VMS') + { + print "1..0\n"; + exit 0; } } |