Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 31 lines (22 sloc) 1.0 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
use v6;
use Test;

# L<S29/"OS"/"=item run">
# system is renamed to run, so link there.

plan 5;

my $res;

$res = run($*EXECUTABLE_NAME,'-e1');
#?rakudo.jvm todo "depends on rakudo being installed"
#?rakudo.moar todo "depends on rakudo being installed"
ok($res,"run() to an existing program does not die (and returns something true)");

$res = run("program_that_does_not_exist_ignore_this_error_please.exe");
ok(!$res, "run() to a nonexisting program does not die (and returns something false)");

$res = run("program_that_does_not_exist_ignore_errors_please.exe","a","b");
ok(!$res, "run() to a nonexisting program with an argument list does not die (and returns something false)");

chdir "t";
my $cwd;
BEGIN { $cwd = $*OS eq 'MSWin32' ?? 'cd' !! 'pwd' };
#?pugs skip 'qqx'
ok((qqx{$cwd} ne BEGIN qqx{$cwd}), 'qqx{} is affected by chdir()');
#?rakudo skip 'run() broken (and test questionable'
ok((run("dir", "t") != BEGIN { run("dir", "t") } ), 'run() is affected by chdir()');

# vim: ft=perl6
Something went wrong with that request. Please try again.