Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 28 lines (19 sloc) 0.808 kb
58135b3 [t/spec] changed 'use v6-alpha;' to 'use v6;'
moritz authored
1 use v6;
66b1616 Moved system() test script under t/spec/S29-os/
cosimo authored
2 use Test;
3
4 # L<S29/"OS"/"=item run">
5 # system may be re-named to run, so link there.
6
7 plan 3;
8
9 if $*OS eq "browser" {
10 skip_rest "Programs running in browsers don't have access to regular IO.";
11 exit;
12 }
13
14 my $pugs = ($*OS eq any(<MSWin32 mingw msys cygwin>))
15 ?? 'pugs.exe'
16 !! $*EXECUTABLE_NAME;
17
18 my $res;
19
20 $res = system($pugs,'-e1');
21 ok($res,"system() to an existing program does not die (and returns something true)");
22
23 $res = system("program_that_does_not_exist_ignore_this_error_please.exe");
24 ok(!$res, "system() to a nonexisting program does not die (and returns something false)");
25
26 $res = system("program_that_does_not_exist_ignore_errors_please.exe","a","b");
27 ok(!$res, "system() to a nonexisting program with an argument list does not die (and returns something false)");
Something went wrong with that request. Please try again.