Skip to content

Commit b4ca313

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

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

t/run/todo.t

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,56 @@ TODO: {
104104
}
105105
is($^W, 1, '$^W value prior to localization is restored; GH 5835');
106106
$^W = $prev_w;
107+
108+
}
109+
110+
TODO: {
111+
local $TODO = "[GH 8267]";
112+
113+
"A" =~ /(((?:A))?)+/;
114+
my $first = $2;
115+
116+
"A" =~ /(((A))?)+/;
117+
my $second = $2;
118+
119+
is($first, $second, "[GH 8267]");
120+
}
121+
122+
TODO: {
123+
local $TODO = "[GH 8859]";
124+
fresh_perl_is(<<~'EOF',
125+
my $mul = 2**32; my $a = 104712103; my $b = 50;
126+
my $c = 449735057880383538; # For these values, $mul * $a + $b == $c. Thus $diff should be zero.
127+
my $diff = $c - ($a * $mul + $b);
128+
printf "%.0f %.0f %.0f %.0f", $a, $b, $c, $diff;
129+
#printf "\$c $c %0.f\n", $c;
130+
EOF
131+
"104712103 50 449735057880383538 0", { eval $switches }, "[GH 8859]");
132+
}
133+
134+
TODO: {
135+
local $TODO = "[GH 10194]";
136+
todo_skip 1 if is_miniperl();
137+
138+
fresh_perl_is(<<~'EOF',
139+
use Encode;
140+
use Devel::Peek;
141+
142+
my $line = "\xe2\x90\x0a";
143+
chomp(my $str = "\xe2\x90\x0a");
144+
145+
Encode::_utf8_on($line);
146+
Encode::_utf8_on($str);
147+
148+
for ($line, $str) {
149+
Dump($_);
150+
# Doesn't crash
151+
$_ =~ /(.*)/;
152+
# List context
153+
() = $_ =~ /(.*)/;
154+
}
155+
EOF
156+
"", { eval $switches }, "[GH 10194]");
107157
}
108158

109159
TODO: {

0 commit comments

Comments
 (0)