Skip to content

Commit fb31b68

Browse files
committed
Add t/run/todo.t
This is a place for tests for unfixed bugs. Such bugs may resurface later in the same or somewhat different form, and we could easily overlook the fact that they are duplicates. By adding TODO tests here, we would automatically get notified that an earlier ticket is fixed when such a later one gets fixed. It is my guess that some open tickets are already fixed and we just don't know it. And it would save time for the proect to not have to go to the issues list and refigure out how to reproduce them, as we periodically do. It would be a good getting-started task for people new to the project to go through our bug list and copy the example failing code snippets into this file.
1 parent 4db0a1d commit fb31b68

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6628,6 +6628,7 @@ t/run/switchx.aux Data for switchx.t
66286628
t/run/switchx.t Test the -x switch
66296629
t/run/switchx2.aux Data for switchx.t
66306630
t/run/switchx3.aux Data for switchx.t
6631+
t/run/todo.t TODO tests
66316632
t/TEST The regression tester
66326633
t/test.pl Simple testing library
66336634
t/test_pl/_num_to_alpha.t Tests for the simple testing library

t/run/todo.t

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!./perl
2+
BEGIN {
3+
chdir 't' if -d 't';
4+
@INC = '../lib';
5+
require './test.pl'; # for fresh_perl_is() etc
6+
}
7+
8+
use strict;
9+
use warnings;
10+
11+
# This file is a place for tests that fail at the time they are added here.
12+
#
13+
# When a ticket is filed, just follow the paradigm(s) in this file to add a
14+
# test that shows the failure.
15+
#
16+
# It is expected that when new tickets are opened, some will actually be
17+
# duplicates of existing known bad behavior. And since there are so many open
18+
# tickets, we might overlook that. If there is a test here, we would
19+
# automatically discover that a fix for the newer ticket actually fixed an
20+
# earlier one (or ones) as well. Thus the issue can be closed, and the final
21+
# disposition of the test here determined at that time. (For example, perhaps
22+
# it is redundant to the test demonstrating the bug that was intentionally
23+
# fixed, so can be removed altogether.)
24+
25+
my $switches = "";
26+
27+
our $TODO;
28+
TODO: {
29+
local $TODO = "GH 16250";
30+
fresh_perl_is(<<~'EOF',
31+
"abcde5678" =~ / b (*pla:.*(*plb:(*plb:(.{4}))? (.{5})).$)/x;
32+
print $1 // "undef", ":", $2 // "undef", "\n";
33+
"abcde5678" =~ / b .* (*plb:(*plb:(.{4}))? (.{5}) ) .$ /x;
34+
print $1 // "undef", ":", $2 // "undef", "\n";
35+
EOF
36+
"undef:de567\nundef:de567", { $switches }, "");
37+
}
38+
39+
done_testing();

0 commit comments

Comments
 (0)