Skip to content

Commit ac0e418

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

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

t/run/todo.t

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

101101
our $TODO;
102102

103+
TODO: {
104+
local $::TODO = 'GH 5835';
105+
my $prev_w = $^W;
106+
$^W = 1;
107+
{
108+
local $^W = $^W;
109+
is($^W, '1', 'local $^W assignment to self ok');
110+
}
111+
is($^W, 1, '$^W value prior to localization is restored');
112+
$^W = $prev_w;
113+
}
114+
103115
TODO: {
104116
local $::TODO = "GH 16008";
105117
my $results = fresh_perl(<<~'EOF', {} );

0 commit comments

Comments
 (0)