; # XXX hmmm, should this really return "bye-bye"?
eval { $ssh->system($^X, '-e', 'exit 0') };
isnt $@, '', 'calling on ssh after exit';
SKIP: {
skip "Symlinks on Windows?", 1 if $^O eq '
dir/test-doit.pl"); 1 };
ok !$ret, 'system command failed';
like $@, qr{^Command exited with exit code (\d+) at}, 'expected error message';
isnt $1, 0, 'exit code is not zero';
}
__END__
>write_binary({atomic=>0}, "$dir/test2", "non-atomic write\n"), 1;
};
is $stdout, '';
isnt $stderr, '';
is slurp("$dir/test2"), "non-atomic write\n", 'content after non-atomic write';
binary("$dir/test-utf8", Encode::encode_utf8("\x{20ac}uro\n")), 1;
};
is $stdout, '';
isnt $stderr, '';
is slurp("$dir/test-utf8"), "\342\202\254uro\n", 'testing the encode_utf8 exampl
ternal command in fork";
is $fork->call_with_runner('run_test', 2, 2), 4, "run function in fork";
isnt $fork->call_with_runner('forked_pid'), $$, 'forked process is really another process';
is $fork->
ached --- and exitcode=0 would be considered an error in this test
}
waitpid $pid, 0;
isnt $?, 0, 'scope cleanup after failure, in separate process';
}
###################################
r->open3({errref => \$stderr, statusref => \%status}, 'this-cmd-does-not-exist-'.$$.'-'.time) };
isnt "$@", ''; # error message seems to differ between perl versions
}
eval { $r->open3($^X,
info message\n";
SKIP: {
skip "No log coloring here", 1
if !Doit::Log::_can_coloring();
isnt $stderr, colorstrip($stderr), 'message is colored';
}
($stdout, $stderr) = capture {
warning