Skip to content

Commit ed0eb72

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

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

t/run/todo.t

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
BEGIN {
33
chdir 't' if -d 't';
44
require './test.pl'; # for fresh_perl_is() etc
5+
skip_all_if_miniperl();
56
set_up_inc('../lib', '.', '../ext/re');
67
require './charset_tools.pl';
78
require './loc_tools.pl';
@@ -38,6 +39,53 @@ my $is_debugging_build = $Config{cppflags} =~ /-DDEBUGGING/;
3839

3940
our $TODO;
4041

42+
TODO: {
43+
local $TODO = "[GH 8267]";
44+
45+
"A" =~ /(((?:A))?)+/;
46+
my $first = $2;
47+
48+
"A" =~ /(((A))?)+/;
49+
my $second = $2;
50+
51+
is($first, $second);
52+
}
53+
54+
TODO: {
55+
local $TODO = "[GH 8859]";
56+
fresh_perl_is(<<~'EOF',
57+
my $mul = 2**32; my $a = 104712103; my $b = 50;
58+
my $c = 449735057880383538; # For these values, $mul * $a + $b == $c. Thus $diff should be zero.
59+
my $diff = $c - ($a * $mul + $b);
60+
printf "%.0f %.0f %.0f %.0f", $a, $b, $c, $diff;
61+
#printf "\$c $c %0.f\n", $c;
62+
EOF
63+
"104712103 50 449735057880383538 0", { eval $switches }, "");
64+
}
65+
66+
TODO: {
67+
local $TODO = "[GH 10194]";
68+
fresh_perl_is(<<~'EOF',
69+
use Encode;
70+
use Devel::Peek;
71+
72+
my $line = "\xe2\x90\x0a";
73+
chomp(my $str = "\xe2\x90\x0a");
74+
75+
Encode::_utf8_on($line);
76+
Encode::_utf8_on($str);
77+
78+
for ($line, $str) {
79+
Dump($_);
80+
# Doesn't crash
81+
$_ =~ /(.*)/;
82+
# List context
83+
() = $_ =~ /(.*)/;
84+
}
85+
EOF
86+
"", { eval $switches }, "");
87+
}
88+
4189
TODO: {
4290
local $::TODO = "GH 16008";
4391
my $results = fresh_perl(<<~'EOF', {} );

0 commit comments

Comments
 (0)