X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fio%2Fargv.t;h=d6c895d6cc9fa806ebfc61a1d9934b9cab7c5734;hb=7de9d14ea5825e7555ec8154a1b3731aa00948b6;hp=8a63c65833a62adb22cbc19c921b962efeb6564d;hpb=1031ca5cb29f226276d55908e55745187e79d1c8;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/io/argv.t b/t/io/argv.t old mode 100755 new mode 100644 index 8a63c65..d6c895d --- a/t/io/argv.t +++ b/t/io/argv.t @@ -5,9 +5,9 @@ BEGIN { @INC = '../lib'; } -require "./test.pl"; +BEGIN { require "./test.pl"; } -plan(tests => 22); +plan(tests => 23); use File::Spec; @@ -38,6 +38,13 @@ is($x, "1a line\n2a line\n", '<> from two files'); is($x, "foo\n", ' from just STDIN'); } +{ + # 5.10 stopped autovivifying scalars in globs leading to a + # segfault when $ARGV is written to. + runperl( prog => 'eof()', stdin => "nothing\n" ); + is( 0+$?, 0, q(eof() doesn't segfault) ); +} + @ARGV = ('Io_argv1.tmp', 'Io_argv1.tmp', $devnull, 'Io_argv1.tmp'); while (<>) { $y .= $. . $_; @@ -56,7 +63,7 @@ close TRY or die "Could not close: $!"; @ARGV = ('Io_argv1.tmp', 'Io_argv2.tmp'); $^I = '_bak'; # not .bak which confuses VMS $/ = undef; -my $i = 6; +my $i = 7; while (<>) { s/^/ok $i\n/; ++$i; @@ -81,7 +88,7 @@ open STDIN, 'Io_argv1.tmp' or die $!; @ARGV = (); ok( !eof(), 'STDIN has something' ); -is( <>, "ok 6\n" ); +is( <>, "ok 7\n" ); open STDIN, $devnull or die $!; @ARGV = ();