Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
$fh.lines if the file has no trailing newline (RT #112130)
  • Loading branch information
moritz committed Mar 30, 2012
1 parent 91d1b92 commit 1fa3c37
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S16-filehandles/io.t
Expand Up @@ -13,7 +13,7 @@ I/O tests
=end pod

plan 83;
plan 84;

#?pugs emit if $*OS eq "browser" {
#?pugs emit skip_rest "Programs running in browsers don't have access to regular IO.";
Expand Down Expand Up @@ -258,6 +258,17 @@ $out.close;
}
unlink($filename);

# RT #112130
{
$out = open($filename, :w);
$out.print('blarg');
$out.close;
my $in = open($filename);
is $in.lines.join, 'blarg', 'can use .lines on a file without trailing newline';
$in.close;
unlink $filename;
}

done;

# vim: ft=perl6

0 comments on commit 1fa3c37

Please sign in to comment.