Skip to content

Commit

Permalink
For non-existent file after spurting, .e says it exists
Browse files Browse the repository at this point in the history
RT#126006
  • Loading branch information
zoffixznet committed Jul 5, 2016
1 parent 9be78ea commit 4afc0db
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S32-io/spurt.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 35;
plan 36;

# L<S32::IO/Functions/spurt>

Expand Down Expand Up @@ -141,3 +141,14 @@ if $path.IO.e {
say "Warn: '$path shouldn't exist";
unlink $path;
}

# RT #126006
{
given 'temp-file-RT-126006-test'.IO {
LEAVE .unlink;
when .e { flunk "ABORT: cannot run test while file `$_` exists"; }

.spurt: 'something';
is .e, True, 'for non-existent file after spurting, .e says it exists';
}
}

0 comments on commit 4afc0db

Please sign in to comment.