projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
121e9ff
)
test that $\ is localized and restored even if it was undef
author
Ricardo Signes
<rjbs@cpan.org>
Sat, 21 Sep 2013 05:51:36 +0000
(14:51 +0900)
committer
Ricardo Signes
<rjbs@cpan.org>
Sat, 21 Sep 2013 05:52:39 +0000
(14:52 +0900)
This was broken before
4bac9ae47b5ad7845a24e26b0e95609805de688a
but there is no test, and it is not clear that we knew about
the bug or the fix.
t/op/tiehandle.t
patch
|
blob
|
history
diff --git
a/t/op/tiehandle.t
b/t/op/tiehandle.t
index
dbd0846
..
08a20eb
100644
(file)
--- a/
t/op/tiehandle.t
+++ b/
t/op/tiehandle.t
@@
-10,7
+10,7
@@
my $data = "";
my @data = ();
require './test.pl';
-plan(tests => 6
3
);
+plan(tests => 6
7
);
sub compare {
local $Level = $Level + 1;
@@
-199,6
+199,11
@@
is($r, 1);
::ok( say $fh @expect[2..4] );
::is( $ors, "\n", 'say sets $\ to \n in PRINT' );
::is( $\, "something", " and it's localized" );
+
+ local $\;
+ ::ok( say $fh @expect[2..4] );
+ ::is( $ors, "\n", 'say sets $\ to \n in PRINT' );
+ ::is( $\, undef, " and it's localized, even for undef \$\\" );
}
{