Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 25 lines (17 sloc) 0.429 kb
ce3256f Refactored evalfile tests under t/spec/S29-context
cosimo authored
1 use v6-alpha;
2 use Test;
3
4 plan 1;
5
6 # L<S29/Context/"=item evalfile">
7
8 sub nonce () { return (".$*PID." ~ int rand 1000) }
9
10 if $*OS eq "browser" {
11 skip_rest "Programs running in browsers don't have access to regular IO.";
12 exit;
13 }
14
15 my $tmpfile = "temp-evalfile" ~ nonce();
16 {
17 my $fh = open("$tmpfile", :w);
18 say $fh: "32 + 10";
19 close $fh;
20 }
21
22 is evalfile($tmpfile), 42, "evalfile() works";
23
24 END { unlink $tmpfile }
Something went wrong with that request. Please try again.