Skip to content

Commit f4f2b0c

Browse files
committed
t/run/todo.t: Add some tests
I had these as works-in-progress. Time to commit them
1 parent 5d79c38 commit f4f2b0c

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

t/run/todo.t

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,51 @@ TODO: {
115115
is($?, 0, "No assertion failure");
116116
}
117117

118+
TODO: {
119+
local $TODO = "[GH 8267]";
120+
121+
"A" =~ /(((?:A))?)+/;
122+
my $first = $2;
123+
124+
"A" =~ /(((A))?)+/;
125+
my $second = $2;
126+
127+
is($first, $second);
128+
}
129+
130+
TODO: {
131+
local $TODO = "[GH 8859]";
132+
fresh_perl_is(<<~'EOF',
133+
my $mul = 2**32; my $a = 104712103; my $b = 50;
134+
my $c = 449735057880383538; # For these values, $mul * $a + $b == $c. Thus $diff should be zero.
135+
my $diff = $c - ($a * $mul + $b);
136+
printf "%.0f %.0f %.0f %.0f", $a, $b, $c, $diff;
137+
#printf "\$c $c %0.f\n", $c;
138+
EOF
139+
"104712103 50 449735057880383538 0", { eval $switches }, "");
140+
}
141+
142+
TODO: {
143+
local $TODO = "[GH 10194]";
144+
fresh_perl_is(<<~'EOF',
145+
use Encode;
146+
use Devel::Peek;
147+
148+
my $line = "\xe2\x90\x0a";
149+
chomp(my $str = "\xe2\x90\x0a");
150+
151+
Encode::_utf8_on($line);
152+
Encode::_utf8_on($str);
153+
154+
for ($line, $str) {
155+
Dump($_);
156+
# Doesn't crash
157+
$_ =~ /(.*)/;
158+
# List context
159+
() = $_ =~ /(.*)/;
160+
}
161+
EOF
162+
"", { eval $switches }, "");
163+
}
164+
118165
done_testing();

0 commit comments

Comments
 (0)