Skip to content

Commit fdd1b60

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

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
@@ -110,6 +110,56 @@ TODO: {
110110
}
111111
is($^W, 1, '$^W value prior to localization is restored');
112112
$^W = $prev_w;
113+
114+
}
115+
116+
TODO: {
117+
local $TODO = "[GH 8267]";
118+
119+
"A" =~ /(((?:A))?)+/;
120+
my $first = $2;
121+
122+
"A" =~ /(((A))?)+/;
123+
my $second = $2;
124+
125+
is($first, $second, "[GH 8267]");
126+
}
127+
128+
TODO: {
129+
local $TODO = "[GH 8859]";
130+
fresh_perl_is(<<~'EOF',
131+
my $mul = 2**32; my $a = 104712103; my $b = 50;
132+
my $c = 449735057880383538; # For these values, $mul * $a + $b == $c. Thus $diff should be zero.
133+
my $diff = $c - ($a * $mul + $b);
134+
printf "%.0f %.0f %.0f %.0f", $a, $b, $c, $diff;
135+
#printf "\$c $c %0.f\n", $c;
136+
EOF
137+
"104712103 50 449735057880383538 0", { eval $switches }, "[GH 8859]");
138+
}
139+
140+
TODO: {
141+
local $TODO = "[GH 10194]";
142+
todo_skip 1 if is_miniperl();
143+
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 }, "[GH 10194]");
113163
}
114164

115165
TODO: {

0 commit comments

Comments
 (0)