Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (18 sloc) 0.442 kb
use v6;
use Test;
plan 1;
# L<S29/Context/"=item evalfile">
sub nonce () { return (".{$*PID}." ~ 1000.rand.Int) }
if $*OS eq "browser" {
skip_rest "Programs running in browsers don't have access to regular IO.";
exit;
}
my $tmpfile = "temp-evalfile" ~ nonce();
{
my $fh = open("$tmpfile", :w);
say $fh: "32 + 10";
close $fh;
}
is evalfile($tmpfile), 42, "evalfile() works";
END { unlink $tmpfile }
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.