mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
todo test for GH 20491 (defer inside do block is broken)
This commit adds a todo test for GH 20491. It tests that a defer block in a single-expression do block runs when exiting said do block, instead of the block holding the do block.
This commit is contained in:
parent
2328936474
commit
7cdc183e0e
10
t/run/todo.t
10
t/run/todo.t
@ -351,6 +351,16 @@ TODO: {
|
||||
isnt($?, 0, 'Compilation fails; GH 19378');
|
||||
}
|
||||
|
||||
TODO: {
|
||||
local $::TODO = 'GH 20491';
|
||||
use experimental 'defer';
|
||||
my $deferred = 0;
|
||||
do {
|
||||
defer { $deferred = 1 };
|
||||
};
|
||||
is($deferred, 1, 'defer in single-expression do block runs when exiting block; GH 20491');
|
||||
}
|
||||
|
||||
TODO: {
|
||||
todo_skip 1 if is_miniperl();
|
||||
local $::TODO = 'GH 22168';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user