Skip to content

Commit f98782d

Browse files
committed
Remove utterly bogus tests.
There is no implicit file close at scope exit in Perl 6, and the tests only appeared to work in any sense on non-Windows because you can unlink an open file there (and on Windows not).
1 parent fd2cdc2 commit f98782d

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

S16-filehandles/unlink.t

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use v6;
22
use Test;
3-
plan 6;
3+
plan 3;
44

55
# L<S29/IO/unlink>
66
# old: L<S16/"Filehandles, files, and directories"/"unlink">
@@ -9,10 +9,6 @@ sub nonce() { "unlink-t-testfile-" ~ 1000.rand }
99

1010
my $fn = "unlink-test-file" ~ nonce;
1111

12-
my $iswin32 = $*DISTRO.is-win
13-
?? "Timely closing of file handles does not yet work"
14-
!! False;
15-
1612
# open, explicit close, unlink, test
1713
{
1814
my $fh = open($fn, :w);
@@ -23,14 +19,5 @@ my $iswin32 = $*DISTRO.is-win
2319
ok $fn.IO !~~ :e, "unlink() actually deleted the tempfile";
2420
}
2521

26-
# open, implicit close because of scope exit, unlink, test
27-
{
28-
{ my $fh = open($fn, :w) }
29-
30-
ok $fn.IO ~~ :e, "open() created a tempfile";
31-
ok(unlink($fn), "unlink() returned true");
32-
#?rakudo skip 'implicit closure of file handle at scope exit NYI (FAILS ON WINDOWS) (noauto)'
33-
ok $fn.IO !~~ :e, "unlink() actually deleted the tempfile";
34-
}
3522

3623
# vim: ft=perl6

0 commit comments

Comments
 (0)