7 Test handling of C<-Cbackend>.
12 ($x.isa(Junction)) ?? (map &flatten, $x.eigenstates) !! $x
15 my @t_good = map &flatten, (
19 ~ any('-e1', map { "examples/$_.pl" }, <
24 junctions/3 junctions/all-any junctions/any-any
25 junctions/any-any2 junctions/grades
31 ~ any('-e1', map {"examples/$_.pl"}, <
44 # I don't know (yet) how to force a junction into expansion
46 for @t_good -> $test {
47 push @tests_ok, $test;
52 if $*OS eq "browser" {
53 skip_rest "Programs running in browsers don't have access to regular IO.";
57 diag "Running under $*OS";
59 # 2>&1 only works on WinNT upwards (cmd.exe) !
60 my $redir_stderr = ">";
62 sub nonce () { return (".{$*PID}." ~ (1..1000).pick) }
64 my $tempfile = "temp-ex-output" ~ nonce;
65 my $command = "$*EXECUTABLE_NAME $c $redir_stderr $tempfile";
68 my $res = $tempfile ~~ :s;
73 for @tests_ok -> $test {
74 my $f = run_pugs($test);
75 ok( defined $f, "dump file was created" );
76 ok( $f >= 3, "... and it contains some output" );