7 Test that the C<--version> command in its various incantations
12 my @tests = any(< -v --version >);
13 @tests = map -> Junction $_ { $_.eigenstates },
14 map -> Junction $_ { $_, "-w $_", "$_ -w", "-w $_ -w" },
18 if $*OS eq "browser" {
19 skip_rest "Programs running in browsers don't have access to regular IO.";
23 diag "Running under $*OS";
27 sub nonce () { return (".{$*PID}." ~ (1..1000).pick) }
30 my $out_fn = "temp-ex-output" ~ nonce;
31 my $command = "$*EXECUTABLE_NAME $ex $redir $out_fn";
35 my $got = slurp $out_fn;
38 like($got, rx:Perl5/Version:.6\.\d+\.\d+/, "'$ex' displays version");