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.
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';
{
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 ----------- #