Skip to content

Commit 8a1cb46

Browse files
committed
Revert "todo test for 14615 (<<>> deparses same as <>)"
This reverts commit aa1c6e9. This reverts commit 3c8eed3. The <<>> operator was introduced in v5.22. During development (the v5.21 branch) it was discovered that B::Deparse didn't handle it correctly. That's GH #14615. B::Deparse was fixed in commit 65ef2c3, but the bug ticket was left open because there was no regression test for B::Deparse yet. The missing regression test was added the same day in commit 2fcbb74, but without reference to the bug ticket, so no one noticed. When v5.22 was released, it had a new <<>> operator, full B::Deparse support, and a regression test for it. The only thing missing was to close #14615. This new test in t/run/todo.t is not just redundant given the history above, it also breaks 'make minitest': # Failed test 2 - No assertion failure at run/todo.t line 50 # got "512" # expected "0" # Failed test 3 - while(<<>>) deparses as while (defined($_ = <<>>)) at run/todo.t line 52 # got 'Can\'t locate B.pm in @inc (@inc entries checked: /home/runner/work/perl5/perl5/cpan/AutoLoader/lib /home/runner/work/perl5/perl5/dist/Carp/lib /home/runner/work/perl5/perl5/dist/PathTools /home/runner/work/perl5/perl5/dist/PathTools/lib /home/runner/work/perl5/perl5/cpan/ExtUtils-Install/lib /home/runner/work/perl5/perl5/cpan/ExtUtils-MakeMaker/lib /home/runner/work/perl5/perl5/cpan/ExtUtils-Manifest/lib /home/runner/work/perl5/perl5/cpan/File-Path/lib /home/runner/work/perl5/perl5/ext/re /home/runner/work/perl5/perl5/dist/Term-ReadLine/lib /home/runner/work/perl5/perl5/dist/Exporter/lib /home/runner/work/perl5/perl5/ext/File-Find/lib /home/runner/work/perl5/perl5/cpan/Text-Tabs/lib /home/runner/work/perl5/perl5/dist/constant/lib /home/runner/work/perl5/perl5/cpan/version/lib /home/runner/work/perl5/perl5/cpan/Getopt-Long/lib /home/runner/work/perl5/perl5/cpan/Text-ParseWords/lib /home/runner/work/perl5/perl5/cpan/ExtUtils-PL2Bat/lib /home/runner/work/perl5/perl5/lib . .) at /home/runner/work/perl5/perl5/lib/B/Deparse.pm line 57.\nBEGIN failed--compilation aborted at /home/runner/work/perl5/perl5/lib/B/Deparse.pm line 57.\nCompilation failed in require at - line 1.\nBEGIN failed--compilation aborted at - line 1.' # expected /(?^:defined\(\$_ = <<>>\))/ Easiest solution: Just revert it.
1 parent fd80e1a commit 8a1cb46

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

t/run/todo.t

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,6 @@ my $is_debugging_build = $Config{cppflags} =~ /-DDEBUGGING/;
3838

3939
our $TODO;
4040

41-
TODO: { # Should be moved to lib/B/Deparse.t
42-
my $results = fresh_perl(<<~'EOF', {});
43-
use B::Deparse;
44-
my $deparse = B::Deparse->new();
45-
my $body = $deparse->coderef2text(
46-
sub { while(<<>>){ print $_ } }
47-
);
48-
print $body;
49-
EOF
50-
is($?, 0, 'No assertion failure');
51-
52-
like $results, qr/defined\(\$_ = <<>>\)/, 'while(<<>>) deparses as while (defined($_ = <<>>))'
53-
}
54-
5541
TODO: {
5642
local $::TODO = "GH 16008";
5743
my $results = fresh_perl(<<~'EOF', {} );

0 commit comments

Comments
 (0)