Skip to content

Commit

Permalink
replace use of README.md (which doesn't exist on 6.c-errata) by $?FILE
Browse files Browse the repository at this point in the history
  • Loading branch information
stmuk committed Apr 25, 2018
1 parent a9b86b5 commit 8e5ac9c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions integration/advent2011-day23.t
Expand Up @@ -112,12 +112,12 @@ is-deeply [@starts_with_number], [10, 20, 30, 20, '40'], '@starts_with_number =

# Magic diamond

my $readme-lines = Test::Util::run( 'my $n; for $*ARGFILES.lines {$n++}; print $n', :args(['README.md']) );
my $readme-lines = Test::Util::run( 'my $n; for $*ARGFILES.lines {$n++}; print $n', :args([$?FILE]) );

ok $readme-lines >= 10, 'for $*ARGFILES.lines {...}'
or diag "output: $readme-lines";

my $readme-lines2 = Test::Util::run( 'my $n; for lines() {$n++}; print $n', :args(['README.md']) );
my $readme-lines2 = Test::Util::run( 'my $n; for lines() {$n++}; print $n', :args([$?FILE]) );

ok $readme-lines2 >= 10, 'for lines() {...}'
or diag "output: $readme-lines2";
Expand Down
4 changes: 2 additions & 2 deletions integration/advent2011-day24.t
Expand Up @@ -31,9 +31,9 @@ multi sub Slurp($filename) {
}
--END--
lives-ok { EVAL $unambiguous ~ 'Slurp("README.md")' },
lives-ok { EVAL $unambiguous ~ 'Slurp("'~$?FILE~'")' },
'unambiguous multi - lives';
throws-like { EVAL $ambiguous ~ 'Slurp("README.md")' },
throws-like { EVAL $ambiguous ~ 'Slurp("'~$?FILE~'")' },
X::Multi::Ambiguous,
'ambiguous multi - dies';

Expand Down
2 changes: 1 addition & 1 deletion packages/RT125245.pm
@@ -1,2 +1,2 @@
use v6;
subset File of Str; my File $in = "README.md";
subset File of Str; my File $in = $?FILE;

0 comments on commit 8e5ac9c

Please sign in to comment.