Skip to content

Commit d4cb58c

Browse files
committed
pugs fudge
1 parent 6ee7d4a commit d4cb58c

File tree

12 files changed

+66
-8
lines changed

12 files changed

+66
-8
lines changed

S02-lexical-conventions/unicode.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ is((do { my $दूसरा = 2; sub टोटल ($x) { $x + 2 }; टोटल
109109
# L<S02/Unicode Semantics/Perl can count Unicode line and paragraph separators>
110110
111111
#?rakudo: todo 'PS does not work to separate lines'
112+
#?pugs skip "eval_lives_ok"
112113
eval_lives_ok "\{ 1 \} \x2029 \{ 1 \}", "Unicode 2029 can terminate lines";
113114
114115
# L<S02/Bracketing Characters/If a character is already used>
115116
117+
#?pugs 6 skip "eval_lives_ok"
116118
eval_lives_ok "q\x298d test \x298e", "Unicode open-298d maps to close-298e";
117119
eval_lives_ok "q\x301d test \x301e", "Unicode open-301d maps to close-301e";
118120
eval_dies_ok "q\x301d test \x301f", "Unicode open-301d does not map to close-301f";

S02-names-vars/variables-and-packages.t

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ plan 37;
9797
{
9898
#?rakudo todo 'nom regression'
9999
#?niecza todo
100+
#?pugs todo
100101
nok foo().defined, "get variable not yet declared using a sub (1)";
101102
is foo(), 1, "get variable not yet declared using a sub (2)";
102103
is foo(), 2, "get variable not yet declared using a sub (3)";
@@ -108,6 +109,7 @@ plan 37;
108109
{
109110
#?rakudo todo 'nom regression'
110111
#?niecza todo
112+
#?pugs todo
111113
nok bar().defined, "runtime part of my not yet executed (1)";
112114
is bar(), 1, "runtime part of my not yet executed (2)";
113115
is bar(), 2, "runtime part of my not yet executed (3)";
@@ -144,6 +146,7 @@ plan 37;
144146

145147
#?rakudo todo 'nom regression'
146148
#?niecza todo
149+
#?pugs todo
147150
nok rmbl().defined, "var captured by sub is the right var (1)";
148151
$a++;
149152
is rmbl(), 2, "var captured by sub is the right var (2)";

S02-names/caller.t

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ plan 18;
7171
}
7272

7373
$_ = 23;
74-
#?pugs todo 'bug'
7574
is bar(), 42, '$_ is implicitly declared "is dynamic" (2)';
7675
}
7776

@@ -85,6 +84,7 @@ plan 18;
8584

8685
my $abs = 23;
8786
#?niecza todo 'strictness'
87+
#?pugs todo
8888
dies_ok { bar() },
8989
'vars not declared "is dynamic" are not accessible via $CALLER::';
9090
}
@@ -113,13 +113,13 @@ plan 18;
113113
my sub modify { $CALLER::_++ }
114114
$_ = 42;
115115
lives_ok { modify() }, '$_ is implicitly rw (1)';
116+
#?pugs todo
116117
is $_, 43, '$_ is implicitly rw (2)';
117118
}
118119

119120
{
120121
my sub modify { $CALLER::foo++ }
121122
my $foo is dynamic = 42;
122-
#?pugs 2 todo 'bug'
123123
lives_ok { modify() },
124124
'"is dynamic" vars declared "is rw" are rw when accessed with $CALLER:: (1)';
125125
is $foo, 43,
@@ -130,6 +130,7 @@ plan 18;
130130
my sub get_foo { try { $DYNAMIC::foo } }
131131
my $foo is dynamic = 42;
132132

133+
#?pugs todo
133134
is get_foo(), 42, '$DYNAMIC:: searches call stack';
134135
}
135136

@@ -139,11 +140,9 @@ plan 18;
139140
my sub rebind_foo { $CALLER::foo := $other_var }
140141
my $foo is dynamic = 42;
141142

142-
#?pugs 2 todo 'bug'
143143
lives_ok { rebind_foo() }, 'rebinding $CALLER:: variables works (1)';
144144
is $foo, 23, 'rebinding $CALLER:: variables works (2)';
145145
$other_var++;
146-
#?pugs todo 'bug'
147146
is $foo, 24, 'rebinding $CALLER:: variables works (3)';
148147
}
149148

S02-types/array_extending.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ plan 21;
5252
my $defined;
5353
try { $defined = defined @array[*-5]; }
5454

55+
#?pugs todo
5556
ok !$defined,
5657
'defined @array[$negative_index_out_of_bounds] should be false';
5758
is +@array, 4,
@@ -103,6 +104,7 @@ plan 21;
103104
is $n, 1, 'grep on extended array';
104105
@a[1] = 'c'; # cmp doesn't handle Mu cmp Mu yet
105106
#?niecza todo 'min on list with undefined el ignores it'
107+
#?pugs todo
106108
is @a.min(), 'b', 'min on list with undefined el ignores it';
107109
}
108110

S02-types/flattening.t

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ plan 33;
99

1010
is(@array.elems, 5, 'array has 5 elements');
1111
is(@array[0], 11, 'first value is 11');
12+
#?pugs todo
1213
is(@array[*-1], 15, 'last value is 15');
1314
# 3[0] etc. should *not* work, but (3,)[0] should.
1415
# That's similar as with the .kv issue we've had: 3.kv should fail, but
@@ -21,6 +22,7 @@ plan 33;
2122
is(@array[0].elems, 5, 'arrayref has 5 elements');
2223
is(@array[0][0], 11, 'first element in arrayref is 11');
2324

25+
#?pugs todo
2426
is(@array[0][*-1], 15, 'last element in arrayref is 15');
2527
}
2628

@@ -30,19 +32,26 @@ plan 33;
3032
is(@array[0].elems, 5, 'first arrayref has 5 elements');
3133
is(@array[1].elems, 5, 'second arrayref has 5 elements');
3234
is(@array[0][0], 11, 'first element in first arrayref is 11');
35+
#?pugs todo
3336
is(@array[0][*-1], 15, 'last element in first arrayref is 15');
3437
is(@array[1][0], 21, 'first element in second arrayref is 21');
38+
#?pugs todo
3539
is(@array[1][*-1], 25, 'last element in second arrayref is 25');
40+
#?pugs todo
3641
is(@array[*-1][0], 31, 'first element in last arrayref is 31');
42+
#?pugs todo
3743
is(@array[*-1][*-1], 35, 'last element in last arrayref is 35');
3844
}
3945

4046
{
4147
my %hash = (k1 => [ 11 .. 15 ]);
4248

49+
#?pugs todo
4350
is(%hash<k1>.elems, 5, 'k1 has 5 elements');
4451
is(%hash<k1>[0], 11, 'first element in k1 is 11');
52+
#?pugs todo
4553
is(%hash<k1>[*-1], 15, 'last element in k1 is 15');
54+
#?pugs todo
4655
nok(%hash<12>.defined, 'nothing at key "12"');
4756
}
4857

@@ -52,8 +61,10 @@ plan 33;
5261
is(%hash<k1>.elems, 5, 'k1 has 5 elements');
5362
is(%hash<k2>.elems, 5, 'k2 has 5 elements');
5463
is(%hash<k1>[0], 11, 'first element in k1 is 11');
64+
#?pugs todo
5565
is(%hash<k1>[*-1], 15, 'last element in k1 is 15');
5666
is(%hash<k2>[0], 21, 'first element in k1 is 21');
67+
#?pugs todo
5768
is(%hash<k2>[*-1], 25, 'last element in k1 is 25');
5869
nok(%hash<12>.defined, 'nothing at key "12"');
5970
nok(%hash<22>.defined, 'nothing at key "22"');

S03-binding/scalars.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,19 +131,19 @@ eval_dies_ok '0 := 1', 'cannot bind to a literal';
131131
# := actually takes subroutine parameter list
132132
#?rakudo skip 'List binding'
133133
#?niecza skip 'list binding'
134+
#?pugs skip 'Cannot bind this as lhs'
134135
{
135136
my $a;
136137
:(:$a) := (:a<foo>);
137-
#?pugs todo
138138
is($a, "foo", "bound keyword");
139139
my @tail;
140140
:($a, *@tail) := (1, 2, 3);
141-
#?pugs todo
142141
ok($a == 1 && ~@tail eq '2 3', 'bound slurpy');
143142
}
144143

145144
# RT #77462
146145
# binding how has the same precedence as list assignment
146+
#?pugs todo
147147
{
148148
my $x := 1, 2;
149149
is $x.join, '12', 'binding has same precdence as list assignment'

S03-operators/autoincrement.t

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ is(%z{0}, $base, '%z{0}');
8181
my $x;
8282

8383
$x = "123.456";
84+
#?pugs todo
8485
is( ++$x, "124.456", "'123.456'++ is '124.456' (NOT 123.457)" );
8586
$x = "124.456";
8687
is( --$x, "123.456", "'124.456'-- is '123.456'" );
@@ -90,8 +91,10 @@ is(%z{0}, $base, '%z{0}');
9091
my $x;
9192

9293
$x = "/tmp/pix000.jpg";
94+
#?pugs todo
9395
is( ++$x, "/tmp/pix001.jpg", "'/tmp/pix000.jpg'++ is '/tmp/pix001.jpg'" );
9496
$x = "/tmp/pix001.jpg";
97+
#?pugs todo
9598
is( --$x, "/tmp/pix000.jpg", "'/tmp/pix001.jpg'-- is '/tmp/pix000.jpg'" );
9699
}
97100

@@ -102,16 +105,19 @@ is(%z{0}, $base, '%z{0}');
102105
$x = "zi";
103106
is( ++$x, "zj", "'zi'++ is 'zj'" );
104107
$x = "zj";
108+
#?pugs todo
105109
is( --$x, "zi", "'zj'-- is 'zi'" );
106110
$x = "zr";
107111

108112
# EBCDIC check (r and s not contiguous)
109113
is( ++$x, "zs", "'zr'++ is 'zs'" );
110114
$x = "zs";
115+
#?pugs todo
111116
is( --$x, "zr", "'zs'-- is 'zr'" );
112117
}
113118

114119
#?niecza skip "Failure NYI"
120+
#?pugs skip "Failure NYI"
115121
{
116122
my $foo;
117123

@@ -127,12 +133,14 @@ is(%z{0}, $base, '%z{0}');
127133

128134
$foo = "\x[3a1]";
129135
#?rakudo todo 'weird ranges'
136+
#?pugs todo 'weird ranges'
130137
is( ++$foo, "\x[3a3]", 'there is no \\x[3a2]' );
131138
}
132139

133140
{
134141
my $foo = "K\x[3c9]";
135142
#?rakudo todo 'weird ranges'
143+
#?pugs todo 'weird ranges'
136144
is( ++$foo, "L\x[3b1]", "increment 'K\x[3c9]'" );
137145
}
138146

@@ -145,6 +153,8 @@ is(%z{0}, $base, '%z{0}');
145153
is $y, 1, 'Can autoincrement a Mu variable (postfix)';
146154
}
147155

156+
#?pugs skip "todo"
157+
#?DOES 2
148158
{
149159
class Incrementor {
150160
has $.value;
@@ -161,6 +171,8 @@ is(%z{0}, $base, '%z{0}');
161171
is $o.value, 84, 'Overriding succ catches prefix increment';
162172
}
163173

174+
#?pugs skip "todo"
175+
#?DOES 2
164176
{
165177
class Decrementor {
166178
has $.value;
@@ -177,6 +189,8 @@ is(%z{0}, $base, '%z{0}');
177189
is $o.value, 16, 'Overriding pred catches prefix decrement';
178190
}
179191

192+
#?pugs skip "todo"
193+
#?DOES 6
180194
{
181195
# L<S03/Autoincrement precedence/Increment of a>
182196

S03-operators/autovivification.t

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,34 +45,39 @@ plan 23;
4545
is $s, 'ab', 'my $s; $s ~= "ab" works'
4646
}
4747

48+
#?pugs todo
4849
{
4950
my Str $s;
5051
$s ~= 'ab';
5152
is $s, 'ab', 'my Str $s; $s ~= "ab" works'
5253
}
5354

5455
#?niecza todo
56+
#?pugs todo
5557
{
5658
my $x;
5759
$x *= 2;
5860
ok $x == 2, 'my $x; $x *= 2 works'
5961
}
6062

6163
#?niecza todo
64+
#?pugs todo
6265
{
6366
my $x;
6467
$x **= 2;
6568
ok $x == 1, 'my $x; $x **= 2 works'
6669
}
6770

6871
#?niecza todo
72+
#?pugs todo
6973
{
7074
my Int $x;
7175
$x *= 2;
7276
ok $x == 2, 'my Int $x; $x *= 2 works'
7377
}
7478

7579
#?niecza todo
80+
#?pugs todo
7681
{
7782
my Int $x;
7883
$x **= 2;
@@ -97,6 +102,7 @@ plan 23;
97102
}
98103

99104
#?niecza todo
105+
#?pugs todo
100106
{
101107
my $x;
102108
$x *= 1i;
@@ -106,6 +112,7 @@ plan 23;
106112
# L<S03/Assignment operators/"If you apply an assignment operator to a
107113
# container">
108114
#?niecza todo
115+
#?pugs todo
109116
{
110117
# yes, this is serious. It's in the specs ;-)
111118
my Int $x;
@@ -114,19 +121,22 @@ plan 23;
114121
}
115122

116123
#?niecza todo
124+
#?pugs todo
117125
{
118126
my $x;
119127
$x *= 5;
120128
is $x, 5, '*= autovivifies with correct neutral element (without type constraint)';
121129
}
122130

123131
#?niecza todo
132+
#?pugs todo
124133
{
125134
my Int %h;
126135
is (%h<foo> *= 23), 23, '*= autovivifies with correct neutral element (with Int proto on hash items)';
127136
}
128137

129138
#?niecza todo
139+
#?pugs todo
130140
{
131141
my %h;
132142
is (%h<foo> *= 23), 23, '*= autovivifies with correct neutral element (without proto on hash items)';

S03-operators/eqv.t

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ plan 53;
4141

4242
ok (\@a eqv \@a), "eqv on array references (1)";
4343
ok (\@b eqv \@b), "eqv on array references (2)";
44+
#?pugs todo
4445
ok !(\@a eqv \@b), "eqv on array references (3)";
4546
@a := @b;
4647
ok \@a eqv \@b, '\@array of two bound arrays are eqv';
@@ -55,6 +56,7 @@ plan 53;
5556
ok ($b eqv $b), "eqv on scalar references (1-2)";
5657
ok ($a eqv $b), "eqv on scalar references (1-3)";
5758
#?rakudo skip 'infix:<!eqv>'
59+
#?pugs todo
5860
ok (\$a !eqv \$b), "eqv on scalar references (1-4)";
5961
}
6062

@@ -99,17 +101,20 @@ plan 53;
99101
{
100102
#?niecza todo
101103
ok !({a => 1} eqv {a => 2}), "eqv on anonymous hash references (-)";
104+
#?pugs todo
102105
ok ({a => 1} eqv {a => 1}), "eqv on anonymous hash references (+)";
106+
#?pugs todo
103107
ok ({a => 2, b => 1} eqv { b => 1, a => 2}), 'order really does not matter';
104108
ok !({a => 1} eqv {a => 1, b => 2}), 'hashes: different number of pairs';
105109
}
106110

107111
#?rakudo skip 'captures'
108112
#?niecza skip 'Cannot use value like Capture as a number'
113+
#?pugs skip "Mu"
114+
#?DOES 3
109115
{
110116
ok !(\3 eqv \4), "eqv on anonymous scalar references (1)";
111117
# XXX the following seems bogus nowadays
112-
#?pugs 2 todo 'bug'
113118
ok !(\3 eqv \3), "eqv on anonymous scalar references (2)";
114119
ok !(\Mu eqv \Mu), "eqv on anonymous scalar references (3)";
115120
}
@@ -139,6 +144,8 @@ plan 53;
139144
is(0 eqv 1, Bool::False, 'eqv returns Bool::False when false');
140145
}
141146

147+
#?pugs skip "Mu"
148+
#?DOES 3
142149
{
143150
#?niecza skip 'Nominal type check failed in binding $a in CORE infix:<eqv>'
144151
is Mu eqv Mu, Bool::True, 'Mu eqv Mu';
@@ -149,7 +156,7 @@ plan 53;
149156

150157
# RT #75322 - Rakudo used to be confused when lists began with ()
151158
{
152-
#?niecza todo
159+
#?niecza todo
153160
nok ((), "x") eqv ((), 9), 'list starting with () - 1';
154161
nok ((), (), 1) eqv ((), 9), 'list starting with () - 1';
155162
nok ((), (), (), 1) eqv ((), (), ""), 'list starting with () - 1';

0 commit comments

Comments
 (0)