summaryrefslogtreecommitdiff
path: root/ext/XS
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-10-29 19:34:05 +0000
committerNicholas Clark <nick@ccl4.org>2008-10-29 19:34:05 +0000
commitcb1ea1622d4ada2138a66363f92a63d6d66fab96 (patch)
treec397bdb11d5f3aa9dcccdfaa18089483d082e2fa /ext/XS
parent5254b38efe447cab6b380b613825d484abf7a3f2 (diff)
downloadperl-cb1ea1622d4ada2138a66363f92a63d6d66fab96.tar.gz
Avoid leaving a VAR.txt after testing terminates on any platform where
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
Diffstat (limited to 'ext/XS')
-rw-r--r--ext/XS/APItest/t/svpeek.t3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/XS/APItest/t/svpeek.t b/ext/XS/APItest/t/svpeek.t
index 3afb039ff8..69d80d7583 100644
--- 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');