diff options
author | Craig A. Berry <craigberry@mac.com> | 2011-08-27 17:26:25 -0500 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2011-08-27 17:26:25 -0500 |
commit | d3288251a84864473722a48deb043d36a04b6fad (patch) | |
tree | 757cffea876ea5fefec3a01c40e12a1c3f742468 /t | |
parent | e1a8dbf543b3c24ee8aacaf571e19124bec0b7ae (diff) | |
download | perl-d3288251a84864473722a48deb043d36a04b6fad.tar.gz |
Get coreamp.t passing on VMS.
The last record in a file ends with a newline willy nilly, so we
might as well write (and test for) one explicitly.
The name of a directory file ends with .DIR, so we need to allow
for that.
File::Temp panics when trying to delete the directory that is the
current working directory, so save where we were and restore to it
before clean-up.
Diffstat (limited to 't')
-rw-r--r-- | t/op/coreamp.t | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/t/op/coreamp.t b/t/op/coreamp.t index ef6db6314c..37802bd5e6 100644 --- a/t/op/coreamp.t +++ b/t/op/coreamp.t @@ -378,7 +378,7 @@ test_proto $_ for qw( test_proto 'exit'; $tests ++; -is runperl(prog => '&CORE::exit; END { print q-ok- }'), 'ok', +is runperl(prog => '&CORE::exit; END { print qq-ok\n- }'), "ok\n", '&exit with no args'; test_proto 'fork'; @@ -724,13 +724,17 @@ test_proto 'warn'; { last if is_miniperl; + require Cwd; + import Cwd; $tests += 2; require File::Temp ; my $dir = File::Temp::tempdir(uc cleanup => 1); + my $cwd = cwd(); chdir($dir); my $_ = 'Phoo'; ok &mymkdir(), '&mkdir'; - like <*>, qr/^phoo\z/i, 'mkdir works with implicit $_'; + like <*>, qr/^phoo(.DIR)?\z/i, 'mkdir works with implicit $_'; + chdir($cwd); # so auto-cleanup can remove $dir } # ------------ END TESTING ----------- # |