From e4b7ebf3387ae98739a0f53e0f27fa7a6228338f Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Sat, 24 Mar 2007 21:14:22 +0000 Subject: Make readline() default to *ARGV. Plus MAD fixes. p4raw-id: //depot/perl@30750 --- t/op/readline.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/op/readline.t b/t/op/readline.t index 394acdb7a6..0d6598f711 100644 --- a/t/op/readline.t +++ b/t/op/readline.t @@ -6,7 +6,7 @@ BEGIN { require './test.pl'; } -plan tests => 17; +plan tests => 18; eval { for (\2) { $_ = } }; like($@, 'Modification of a read-only value attempted', '[perl #19566]'); @@ -83,6 +83,10 @@ fresh_perl_is('BEGIN{<>}', '', { switches => ['-w'], stdin => '', stderr => 1 }, 'No ARGVOUT used only once warning'); +fresh_perl_is('print readline', 'foo', + { switches => ['-w'], stdin => 'foo', stderr => 1 }, + 'readline() defaults to *ARGV'); + my $obj = bless []; $obj .= ; like($obj, qr/main=ARRAY.*world/, 'rcatline and refs'); -- cgit v1.2.1