Skip to content

Commit d29ca7d

Browse files
committed
todo test for GH 5835 (local($^W) does not work correctly)
1 parent 1473648 commit d29ca7d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

t/run/todo.t

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,21 @@ my $is_debugging_build = $Config{cppflags} =~ /-DDEBUGGING/;
100100

101101
our $TODO;
102102

103+
TODO: {
104+
local $::TODO = 'GH 5835';
105+
my $results = fresh_perl(<<~'EOF', {});
106+
$^W = 1;
107+
print "$^W";
108+
{
109+
local $^W = $^W;
110+
print "$^W";
111+
}
112+
print "$^W";
113+
EOF
114+
is($?, 0, 'perl exited normally');
115+
is($results, '111', 'localized $^W behaves like ordinary localized scalar');
116+
}
117+
103118
TODO: {
104119
local $::TODO = "GH 16008";
105120
my $results = fresh_perl(<<~'EOF', {} );

0 commit comments

Comments
 (0)