Skip to content

Commit

Permalink
[io grant] Test &words with IO::ArgFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Apr 24, 2017
1 parent 18d9c04 commit 8f78ca6
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S16-io/words.t
@@ -1,7 +1,9 @@
use v6;
use lib <t/spec/packages>;
use Test;
use Test::Util;

plan 1 + 4 + 4;
plan 10;

my $filename = 't/spec/S16-io/words.testing';
my @text = <<zero " one" " two " " three " "four\n">>;
Expand Down Expand Up @@ -45,4 +47,13 @@ is $elems, +@clean, "IO count-only";

unlink $filename; # cleanup

{
$*ARGFILES = IO::ArgFiles.new: :args[
make-temp-file(:content<foo bar>), make-temp-file(:content<meow moo>),
make-temp-file(:content<I ♥ Perl 6>),
];
is-deeply words(), <foo bar meow moo I ♥ Perl 6.Str.Seq,
'words() without args uses $*ARGFILES';
}

# vim: ft=perl6

0 comments on commit 8f78ca6

Please sign in to comment.