use lib "$FindBin::Bin/lib";
use Catalyst::Test qw(TestApp);
-plan 'skip_all' if !-e '/bin/ls'; # see if /bin/ls exists
+plan skip_all => 'Using remote server'
+ if $ENV{CATALYST_SERVER};
+
+plan skip_all => 'Skipping fork tests: no /bin/ls'
+ if !-e '/bin/ls'; # see if /bin/ls exists
+
plan tests => 13; # otherwise
{
my $result_ref = eval { Load($result) };
ok($result_ref, 'is YAML');
- is($result_ref->{code}, 0, 'exited successfully');
- like($result_ref->{result}, qr{^/bin/ls[^:]}, 'contains ^/bin/ls$');
+ is($result_ref->{result}, 0, 'exited OK');
}
{
ok($result_ref, 'is YAML');
is($result_ref->{code}, 0, 'exited successfully');
like($result_ref->{result}, qr{^/bin/ls[^:]}, 'contains ^/bin/ls$');
+ like($result_ref->{result}, qr{\n.*\n}m, 'contains two newlines');
}
{
fork: