projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5254b38
)
Avoid leaving a VAR.txt after testing terminates on any platform where
author
Nicholas Clark
<nick@ccl4.org>
Wed, 29 Oct 2008 19:34:05 +0000
(19:34 +0000)
committer
Nicholas Clark
<nick@ccl4.org>
Wed, 29 Oct 2008 19:34:05 +0000
(19:34 +0000)
you can't unlink an open file by instead opening $^X for read to get a
file handle for test purposes.
p4raw-id: //depot/perl@34639
ext/XS/APItest/t/svpeek.t
patch
|
blob
|
history
diff --git
a/ext/XS/APItest/t/svpeek.t
b/ext/XS/APItest/t/svpeek.t
index
3afb039
..
69d80d7
100644
(file)
--- a/
ext/XS/APItest/t/svpeek.t
+++ b/
ext/XS/APItest/t/svpeek.t
@@
-58,11
+58,10
@@
like (DPeek ($1), qr'^PVMG\("', ' $1');
is (DPeek (sub {}), '\CV(__ANON__)', 'sub {}');
{ our ($VAR, @VAR, %VAR);
- open VAR, "
>VAR.txt
";
+ open VAR, "
<", $^X or die "Can't open $^X: $!
";
sub VAR {}
format VAR =
.
- END { unlink "VAR.txt" };
is (DPeek ( $VAR), 'UNDEF', ' $VAR undef');
is (DPeek (\$VAR), '\UNDEF', '\$VAR undef');