summaryrefslogtreecommitdiff
path: root/t/io
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-02-14 05:51:56 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-02-14 05:51:56 +0000
commitfbad3eb55c1f8c84d1dfd0e484ecddeffc891e79 (patch)
treef3886be033e03113de9177f18cdf413345741e1c /t/io
parent428f79ef10ad4e14667125f22397bceac3e2c65e (diff)
downloadperl-fbad3eb55c1f8c84d1dfd0e484ecddeffc891e79.tar.gz
slurping an empty file should return '' rather than undef, with
commensurate effects on ARGV processing p4raw-id: //depot/perl@2910
Diffstat (limited to 't/io')
-rwxr-xr-xt/io/argv.t21
1 files changed, 16 insertions, 5 deletions
diff --git a/t/io/argv.t b/t/io/argv.t
index d99865e142..cb2ffb346e 100755
--- a/t/io/argv.t
+++ b/t/io/argv.t
@@ -1,10 +1,8 @@
#!./perl
-# $RCSfile: argv.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:25 $
+print "1..6\n";
-print "1..5\n";
-
-open(try, '>Io.argv.tmp') || (die "Can't open temp file.");
+open(try, '>Io.argv.tmp') || (die "Can't open temp file: $!");
print try "a line\n";
close try;
@@ -45,4 +43,17 @@ if ($y eq "1a line\n2a line\n3a line\n")
else
{print "not ok 5\n";}
-unlink 'Io.argv.tmp';
+open(try, '>Io.argv.tmp') or die "Can't open temp file: $!";
+close try;
+@ARGV = 'Io.argv.tmp';
+$^I = '';
+$/ = undef;
+while (<>) {
+ s/^/ok 6\n/;
+ print;
+}
+open(try, '<Io.argv.tmp') or die "Can't open temp file: $!";
+print while <try>;
+close try;
+
+END { unlink 'Io.argv.tmp' }