Skip to content

Commit 3c8eed3

Browse files
1-1samkhwilliamson
authored andcommitted
todo test for 14615 (<<>> deparses same as <>)
1 parent 89cb0b3 commit 3c8eed3

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
@@ -34,6 +34,21 @@ my $switches = "";
3434

3535
our $TODO;
3636

37+
TODO: {
38+
local $::TODO = "GH 14615";
39+
my $results = fresh_perl(<<~'EOF', {});
40+
use B::Deparse;
41+
my $deparse = B::Deparse->new();
42+
my $body = $deparse->coderef2text(
43+
sub { while(<<>>){ print $_ } }
44+
);
45+
print $body;
46+
EOF
47+
is($?, 0, 'No assertion failure');
48+
49+
like $results, qr/defined\(\$_ = <<>>\)/, 'while(<<>>) deparses as while (defined($_ = <<>>))'
50+
}
51+
3752
TODO: {
3853
local $::TODO = "GH 16008";
3954
my $results = fresh_perl(<<~'EOF', {} );

0 commit comments

Comments
 (0)