Skip to content

Commit 8bc887b

Browse files
committed
t/run/todo.t: Add some tests
I had these as works-in-progress. Time to commit them
1 parent 49e03d5 commit 8bc887b

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

t/run/todo.t

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

101101
our $TODO;
102102

103+
TODO: {
104+
local $TODO = "[GH 8267]";
105+
106+
"A" =~ /(((?:A))?)+/;
107+
my $first = $2;
108+
109+
"A" =~ /(((A))?)+/;
110+
my $second = $2;
111+
112+
is($first, $second);
113+
}
114+
115+
TODO: {
116+
local $TODO = "[GH 8859]";
117+
fresh_perl_is(<<~'EOF',
118+
my $mul = 2**32; my $a = 104712103; my $b = 50;
119+
my $c = 449735057880383538; # For these values, $mul * $a + $b == $c. Thus $diff should be zero.
120+
my $diff = $c - ($a * $mul + $b);
121+
printf "%.0f %.0f %.0f %.0f", $a, $b, $c, $diff;
122+
#printf "\$c $c %0.f\n", $c;
123+
EOF
124+
"104712103 50 449735057880383538 0", { eval $switches }, "");
125+
}
126+
127+
TODO: {
128+
local $TODO = "[GH 10194]";
129+
todo_skip 1 if is_miniperl();
130+
131+
fresh_perl_is(<<~'EOF',
132+
use Encode;
133+
use Devel::Peek;
134+
135+
my $line = "\xe2\x90\x0a";
136+
chomp(my $str = "\xe2\x90\x0a");
137+
138+
Encode::_utf8_on($line);
139+
Encode::_utf8_on($str);
140+
141+
for ($line, $str) {
142+
Dump($_);
143+
# Doesn't crash
144+
$_ =~ /(.*)/;
145+
# List context
146+
() = $_ =~ /(.*)/;
147+
}
148+
EOF
149+
"", { eval $switches }, "");
150+
}
151+
103152
TODO: {
104153
local $::TODO = "GH 16008";
105154
my $results = fresh_perl(<<~'EOF', {} );

0 commit comments

Comments
 (0)