diff options
author | Craig A. Berry <craigberry@mac.com> | 2015-07-09 17:31:40 -0500 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2015-07-09 17:31:40 -0500 |
commit | a3b5f9fb00dafcb11d1766baaec76abc90f9fd06 (patch) | |
tree | f0eff3501a84c1e0e3060d89de6db9e36b538f33 | |
parent | 30dc90f1923c08aae65b60f713ac12490a716e10 (diff) | |
download | perl-a3b5f9fb00dafcb11d1766baaec76abc90f9fd06.tar.gz |
Don't create zero-length filename on VMS in Typemap.t
It turns out it's quite legal but then causes other mayhem, such
as confusing things that are looking for the "." directory (because
there is no such thing as a file without an extension so passing
an empty string to fopen creates ".;1" on disk).
Also make this test clean up its test files.
-rw-r--r-- | ext/XS-Typemap/t/Typemap.t | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/XS-Typemap/t/Typemap.t b/ext/XS-Typemap/t/Typemap.t index 49ac479884..46ab20fd11 100644 --- a/ext/XS-Typemap/t/Typemap.t +++ b/ext/XS-Typemap/t/Typemap.t @@ -361,6 +361,8 @@ note("T_STDIO"); # open a file in XS for write my $testfile= "stdio.tmp"; +# not everything below cleans up +END { 1 while unlink $testfile; } my $fh = T_STDIO_open( $testfile ); ok( $fh ); @@ -402,7 +404,8 @@ ok( print($fh "first line\n"), 'can print to return io in arg'); ok( close($fh), 'can close return io in arg'); $fh = "FOO"; #now with a bad file name to make sure $fh is written to on failure -T_STDIO_open_ret_in_arg( "", $fh); +my $badfile = $^O eq 'VMS' ? '?' : ''; +T_STDIO_open_ret_in_arg( $badfile, $fh); ok( !defined$fh, 'return io in arg open failed successfully'); # T_INOUT |