Loop in S_init_perllib(), only calling S_incpush*() with INCPUSH_ADD_OLD_VERS
[p5sagit/p5-mst-13.2.git] / t / op / readline.t
index 394acdb..1069a97 100644 (file)
@@ -6,17 +6,17 @@ BEGIN {
     require './test.pl';
 }
 
-plan tests => 17;
+plan tests => 18;
 
 eval { for (\2) { $_ = <FH> } };
 like($@, 'Modification of a read-only value attempted', '[perl #19566]');
 
 {
-  open A,"+>a"; $a = 3;
+  my $file = tempfile();
+  open A,'+>',$file; $a = 3;
   is($a .= <A>, 3, '#21628 - $a .= <A> , A eof');
   close A; $a = 4;
   is($a .= <A>, 4, '#21628 - $a .= <A> , A closed');
-  unlink "a";
 }
 
 # 82 is chosen to exceed the length for sv_grow in do_readline (80)
@@ -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 .= <DATA>;
 like($obj, qr/main=ARRAY.*world/, 'rcatline and refs');