Re: [perl #41071] require stringifies code references in tied @INC
[p5sagit/p5-mst-13.2.git] / t / op / readline.t
index d047f16..394acdb 100644 (file)
@@ -6,7 +6,7 @@ BEGIN {
     require './test.pl';
 }
 
-plan tests => 13;
+plan tests => 17;
 
 eval { for (\2) { $_ = <FH> } };
 like($@, 'Modification of a read-only value attempted', '[perl #19566]');
@@ -79,8 +79,29 @@ SKIP: {
   }
 }
 
+fresh_perl_is('BEGIN{<>}', '',
+              { switches => ['-w'], stdin => '', stderr => 1 },
+              'No ARGVOUT used only once warning');
+
+my $obj = bless [];
+$obj .= <DATA>;
+like($obj, qr/main=ARRAY.*world/, 'rcatline and refs');
+
+# bug #38631
+require Tie::Scalar;
+tie our $one, 'Tie::StdScalar', "A: ";
+tie our $two, 'Tie::StdScalar', "B: ";
+my $junk = $one;
+$one .= <DATA>;
+$two .= <DATA>;
+is( $one, "A: One\n", "rcatline works with tied scalars" );
+is( $two, "B: Two\n", "rcatline works with tied scalars" );
+
 __DATA__
 moo
 moo
  rules
  rules
+world
+One
+Two