Skip to content

Commit d0e149b

Browse files
committed
niecza fudging
1 parent 72da761 commit d0e149b

File tree

29 files changed

+383
-173
lines changed

29 files changed

+383
-173
lines changed

S02-literals/array-interpolation.t

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ plan 12;
1616

1717
is ~@array, "a b c d",
1818
"arrays whose elements don't contain whitespace stringify correctly (1)";
19+
#?niecza skip 'No value for parameter $index in CORE postcircumfix:<[ ]>'
1920
is "@array[]", "a b c d", "arrays whose elements don't contain whitespace stringify correctly (2)";
21+
#?niecza skip 'No value for parameter $index in CORE postcircumfix:<[ ]>'
2022
is "@array.[]", "a b c d", '@array.[] interpolates';
2123
is "@array", "@array", '@array (without brackets) doesnt interpolate';
2224
}
@@ -27,6 +29,7 @@ plan 12;
2729

2830
is ~@array, "a b c d e f g h",
2931
"arrays with embedded array references stringify correctly (1)";
32+
#?niecza skip 'No value for parameter $index in CORE postcircumfix:<[ ]>'
3033
is "@array[]", "a b c d e f g h", "arrays with embedded array references stringify correctly (2)";
3134
}
3235

@@ -35,6 +38,7 @@ plan 12;
3538

3639
is ~@array, "a b c",
3740
"array whose elements do contain whitespace stringify correctly (1-1)";
41+
#?niecza skip 'No value for parameter $index in CORE postcircumfix:<[ ]>'
3842
is "@array[]", "a b c", "array whose elements do contain whitespace stringify correctly (1-2)";
3943
}
4044

@@ -43,6 +47,7 @@ plan 12;
4347

4448
is ~@array, "a\t b c",
4549
"array whose elements do contain whitespace stringify correctly (2-1)";
50+
#?niecza skip 'No value for parameter $index in CORE postcircumfix:<[ ]>'
4651
is "@array[]", "a\t b c", "array whose elements do contain whitespace stringify correctly (2-2)";
4752
}
4853

@@ -51,6 +56,7 @@ plan 12;
5156

5257
is ~@array, "a\t b c",
5358
"array whose elements do contain whitespace stringify correctly (3-1)";
59+
#?niecza skip 'No value for parameter $index in CORE postcircumfix:<[ ]>'
5460
is "@array[]", "a\t b c", "array whose elements do contain whitespace stringify correctly (3-2)";
5561
}
5662

S03-operators/also.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ plan 8;
44
# L<S03/"Junctive and (all) precedence"/"infix:<&>">
55

66
ok ?(1 S& 2), "basic infix:<S&>";
7+
#?niecza skip 'Excess arguments to CORE seqop, used 3 of 4 positionals'
78
ok ?(1 S& 2 S& 3), "basic infix:<S&> (multiple S&'s)";
89
#?rakudo todo 'nom regression'
910
ok !(0 S& 1), "S& has and-semantics (first term 0)";
@@ -20,6 +21,7 @@ my $executed = 0;
2021

2122
#?rakudo todo 'nom regression'
2223
ok !('a' ~~ 'b' S& { $executed = 1; True }), 'and semantics';
24+
#?niecza skip 'TODO'
2325
ok !$executed, 'short-circuit';
2426
2527
# vim: ft=perl6

S03-operators/range.t

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,48 @@ plan 113;
88
# L<S03/Nonchaining binary precedence/Range object constructor>
99

1010
# 3..2 must *not* produce "3 2". Use reverse to get a reversed range. -lwall
11-
11+
#?niecza skip 'TODO'
1212
is ~(3..6), "3 4 5 6", "(..) works on numbers (1)";
13+
#?niecza skip 'TODO'
1314
is ~(3..3), "3", "(..) works on numbers (2)";
15+
#?niecza skip 'TODO'
1416
is ~(3..2), "", "(..) works on auto-rev numbers (3)";
17+
#?niecza skip 'TODO'
1518
is ~(8..11), "8 9 10 11", "(..) works on carried numbers (3)";
1619

20+
#?niecza skip 'TODO'
1721
is ~("a".."c"), "a b c", "(..) works on chars (1)";
22+
#?niecza skip 'TODO'
1823
is ~("a".."a"), "a", "(..) works on chars (2)";
24+
#?niecza skip 'TODO'
1925
is ~("b".."a"), "", "(..) works on chars (3)";
26+
#?niecza skip 'TODO'
2027
is ~("a".."z"), "a b c d e f g h i j k l m n o p q r s t u v w x y z", "(..) works on char range ending in z";
28+
#?niecza skip 'TODO'
2129
is ~("A".."Z"), "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z", "(..) works on char range ending in Z";
30+
#?niecza skip 'TODO'
2231
is ~("Y".."AB"), "", "(..) works on carried chars (3)";
2332

2433
#?rakudo 4 skip 'Spec under design here'
34+
#?niecza skip 'TODO'
2535
is ~('Y'..'z'), 'Y Z', '(..) works on uppercase letter .. lowercase letter (1)';
36+
#?niecza skip 'TODO'
2637
is ~('z'..'Y'), '', '(..) works on auto-rev uppercase letter .. lowercase letter (2)';
38+
#?niecza skip 'TODO'
2739
is ~('Y'..'_'), 'Y Z', '(..) works on letter .. non-letter (1)';
40+
#?niecza skip 'TODO'
2841
is ~('_'..'Y'), '', '(..) works on auto-rev letter .. non-letter (2)';
2942
#?rakudo skip "nom regression: No applicable candidates found to dispatch to for 'Numeric'."
43+
#?niecza skip 'TODO'
3044
is ~(' '..' '), ' ', 'all-whitespace range works';
3145

46+
#?niecza skip 'TODO'
3247
is ~(3..9-3), "3 4 5 6", "(..) has correct precedence (1)";
48+
#?niecza skip 'TODO'
3349
is ~(5..9-5), "", "(..) has correct precedence (2)";
50+
#?niecza skip 'TODO'
3451
is ~(2+1..6), "3 4 5 6", "(..) has correct precedence (3)";
52+
#?niecza skip 'TODO'
3553
is ~(2+5..6), "", "(..) has correct precedence (4)";
3654

3755
# Test the three exclusive range operators:
@@ -65,12 +83,15 @@ is ['a' ^..^ 'a'], [], "double-exclusive range (x ^..^ x) where x is a char";
6583
is 1.5 ~~ 1^..^2, Bool::True, "lazy evaluation of the range operator";
6684

6785
# Test the unary ^ operator
86+
#?niecza skip 'TODO'
6887
is ~(^5), "0 1 2 3 4", "unary ^num produces the range 0..^num";
6988
is [^1], [0], "unary ^ on the boundary ^1 works";
7089
is [^0], [], "unary ^0 produces null range";
7190
is [^-1], [], "unary ^-1 produces null range";
7291
is [^0.1], [0], "unary ^0.1 produces the range 0..^x where 0 < x < 1";
92+
#?niecza skip 'System.FormatException: Unknown char: a'
7393
is [^'a'], [], "unary ^'a' produces null range";
94+
#?niecza skip 'TODO'
7495
is ~(^"5"), "0 1 2 3 4", 'unary ^"num" produces the range 0..^num';
7596

7697
{
@@ -90,6 +111,7 @@ is (<c b a> Z 1..5).join('|'), 'c|1|b|2|a|3', 'Ranges and infix:<Z>';
90111
# two ranges
91112
is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
92113

114+
#?niecza skip 'TODO'
93115
{
94116
# Test with floats
95117
# 2006-12-05:
@@ -127,6 +149,7 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
127149
## remove these tests from the suite.
128150
# RT #58018
129151
# RT #76950
152+
#?niecza skip 'TODO'
130153
{
131154
my @three = (1, 1, 1);
132155
my @one = 1;
@@ -146,6 +169,7 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
146169
is (0..3).map({$_ * 2}).join('|'), '0|2|4|6', '.map works on ranges';
147170
is (0..3).grep({$_ == 1|3}).join('|'), '1|3', '.grep works on ranges';
148171
is (1..3).first({ $_ % 2 == 0}), 2, '.first works on ranges';
172+
#?niecza skip 'Unable to resolve method reduce in class Range'
149173
is (1..3).reduce({ $^a + $^b}), 6, '.reduce works on ranges';
150174
}
151175

@@ -162,6 +186,7 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
162186
is $range.max.WHAT.gist, "Str()", 'range end is a string';
163187
lives_ok { "$range" }, 'can stringify range';
164188
#?rakudo skip "nom regression: No applicable candidates found to dispatch to for 'Numeric'."
189+
#?niecza skip 'TODO'
165190
is ~$range, "100.B 101.B 102.B", 'range is correct';
166191
}
167192

@@ -174,6 +199,7 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
174199
is $range.max, 3, 'range ends at three';
175200
#?rakudo 2 skip "range stringification: Method 'succ' not found for invocant of class 'Match'"
176201
lives_ok { "$range" }, 'can stringify range';
202+
#?niecza skip 'TODO'
177203
is ~$range, "1 2 3", 'range is correct';
178204
}
179205
# and another set, just for the lulz
@@ -182,6 +208,7 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
182208
ok '1 3' ~~ /(\d) . (\d)/, 'regex sanity';
183209
isa_ok $0..$1, Range, '$0..$1 constructs a Range';
184210
#?rakudo skip "range with match object endpoints: Method 'succ' not found for invocant of class 'Match'"
211+
#?niecza skip 'cannot increment a value of type Match'
185212
is ($0..$1).join('|'), '1|2|3', 'range from $0..$1';
186213
}
187214
{
@@ -191,6 +218,7 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
191218
is $range.min, 1, 'range starts at one';
192219
is $range.max, 3, 'range ends at three';
193220
lives_ok { "$range" }, 'can stringify range';
221+
#?niecza skip 'TODO'
194222
is ~$range, "1 2 3", 'range is correct';
195223
}
196224
{
@@ -202,13 +230,15 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
202230
is $range.max, 3, 'range ends at three';
203231
is $range.max.WHAT.gist, "Str()", 'range end is a string';
204232
lives_ok { "$range" }, 'can stringify range';
233+
#?niecza skip 'TODO'
205234
is ~$range, "1 2 3", 'range is correct';
206235
}
207236

208237
# L<S03/Nonchaining binary precedence/it is illegal to use a Range or a
209238
# List as implicitly numeric:>
210239

211240
#?rakudo todo 'forbid Ranges and Lists as Range endpoints'
241+
#?niecza skip 'TODO'
212242
{
213243
ok !defined(try { 0 .. ^10 }), '0 .. ^10 is illegal';
214244
ok !defined(try { 0 .. (0, 1, 2) }), '0 .. List is illegal';
@@ -223,6 +253,7 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
223253

224254
# RT #82620
225255
#?rakudo todo "range leaking Parrot types: Method 'trans' not found for invocant of class 'Str'"
256+
#?niecza skip 'TODO'
226257
{
227258
lives_ok {("a".."b").map({.trans(""=>"")}).perl},
228259
"range doesn't leak Parrot types";

S03-operators/subscript-adverbs.t

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,16 @@ plan 64;
2020
is @array[0], "a",
2121
":p on an array returns lvalues (like normal subscripts do as well)";
2222

23+
#?niecza skip 'Cannot use value like Pair as a number'
2324
is +(@array[0,1]:p), 2,
2425
":p on an array returned a two-elem array";
26+
#?niecza skip 'TODO'
2527
is ~(@array[0,1]:p), "0\ta 1\tB",
2628
":p on an array returned a two-elem array consisting of the correct pairs";
2729

30+
#?niecza skip 'Cannot use value like Pair as a number'
2831
is +(@array[42,23]:p), 0, ":p on an array weeded out non-existing entries (1)";
32+
#?niecza skip 'TODO'
2933
is ~(@array[42,23]:p), "", ":p on an array weeded out non-existing entries (2)";
3034
}
3135

@@ -42,19 +46,24 @@ plan 64;
4246
is @array[0], "a",
4347
":kv on an array returns lvalues (like normal subscripts do as well)";
4448

49+
#?niecza skip 'TODO'
4550
is +(@array[0,1]:kv), 4,
4651
":kv on an array returned a four-elem array";
52+
#?niecza skip 'TODO'
4753
is ~(@array[0,1]:kv), "0 a 1 B",
4854
":kv on an array returned the correct four-elem array";
4955

56+
#?niecza skip 'TODO'
5057
is +(@array[42,23]:kv), 0, ":kv on an array weeded out non-existing entries (1)";
58+
#?niecza skip 'TODO'
5159
is ~(@array[42,23]:kv), "", ":kv on an array weeded out non-existing entries (2)";
5260
}
5361

5462
# :k
5563
{
5664
my @array = <A B>;
5765

66+
#?niecza skip 'TODO'
5867
is +(@array[0]:k), 1,
5968
":k on an array returned an one-elem array";
6069
is ~(@array[0]:k), "0",
@@ -65,29 +74,39 @@ plan 64;
6574
is ~(@array[0,1]:k), "0 1",
6675
":k on an array returned the correct two-elem array";
6776

77+
#?niecza skip 'TODO'
6878
is +(@array[42,23]:k), 0, ":k on an array weeded out non-existing entries (1)";
79+
#?niecza skip 'TODO'
6980
is ~(@array[42,23]:k), "", ":k on an array weeded out non-existing entries (2)";
7081
}
7182

7283
# :v
7384
{
7485
my @array = <A B>;
7586

87+
#?niecza skip 'Excess arguments to KERNEL Array.postcircumfix:<[ ]>, unused named v'
7688
is +(@array[0]:v), 1,
7789
":v on an array returned an one-elem array";
90+
#?niecza skip 'Excess arguments to KERNEL Array.postcircumfix:<[ ]>, unused named v'
7891
is ~(@array[0]:v), "A",
7992
":v on an array returned the correct one-elem array";
8093

94+
#?niecza skip 'TODO'
8195
lives_ok {@array[0]:v = "a"}, 'can assign to @array[0]:v';
96+
#?niecza skip 'TODO'
8297
is @array[0], "a",
8398
":v on an array returns lvalues (like normal subscripts do as well)";
8499

100+
#?niecza skip 'Excess arguments to KERNEL Array.postcircumfix:<[ ]>, unused named v'
85101
is +(@array[0,1]:v), 2,
86102
":v on an array returned a tow-elem array";
103+
#?niecza skip 'Excess arguments to KERNEL Array.postcircumfix:<[ ]>, unused named v'
87104
is ~(@array[0,1]:v), "a B",
88105
":v on an array returned the correct two-elem array";
89106

107+
#?niecza skip 'Excess arguments to KERNEL Array.postcircumfix:<[ ]>, unused named v'
90108
is +(@array[42,23]:v), 0, ":v on an array weeded out non-existing entries (1)";
109+
#?niecza skip 'Excess arguments to KERNEL Array.postcircumfix:<[ ]>, unused named v'
91110
is ~(@array[42,23]:v), "", ":v on an array weeded out non-existing entries (2)";
92111
}
93112

@@ -105,12 +124,16 @@ plan 64;
105124
is %hash<0>, "a",
106125
":p on a hash returns lvalues (like normal subscripts do as well)";
107126

127+
#?niecza skip 'Cannot use value like Pair as a number'
108128
is +(%hash<0 1>:p), 2,
109129
":p on a hash returned a two-elem array";
130+
#?niecza skip 'TODO'
110131
is ~(%hash<0 1>:p), "0\ta 1\tB",
111132
":p on a hash returned a two-elem array consisting of the correct pairs";
112133

134+
#?niecza skip 'Cannot use value like Pair as a number'
113135
is +(%hash<42 23>:p), 0, ":p on a hash weeded out non-existing entries (1)";
136+
#?niecza skip 'TODO'
114137
is ~(%hash<42 23>:p), "", ":p on a hash weeded out non-existing entries (2)";
115138
}
116139

@@ -127,19 +150,24 @@ plan 64;
127150
is %hash<0>, "a",
128151
":kv on a hash returns lvalues (like normal subscripts do as well)";
129152

153+
#?niecza skip 'TODO'
130154
is +(%hash<0 1>:kv), 4,
131155
":kv on a hash returned a four-elem array";
156+
#?niecza skip 'TODO'
132157
is ~(%hash<0 1>:kv), "0 a 1 B",
133158
":kv on a hash returned the correct four-elem array";
134159

160+
#?niecza skip 'TODO'
135161
is +(%hash<42 23>:kv), 0, ":kv on a hash weeded out non-existing entries (1)";
162+
#?niecza skip 'TODO'
136163
is ~(%hash<42 23>:kv), "", ":kv on a hash weeded out non-existing entries (2)";
137164
}
138165

139166
# :k
140167
{
141168
my %hash = (0 => "A", 1 => "B");
142169

170+
#?niecza skip 'TODO'
143171
is +(%hash<0>:k), 1,
144172
":k on a hash returned an one-elem array";
145173
is ~(%hash<0>:k), "0",
@@ -150,29 +178,39 @@ plan 64;
150178
is ~(%hash<0 1>:k), "0 1",
151179
":k on a hash returned the correct two-elem array";
152180

181+
#?niecza skip 'TODO'
153182
is +(%hash<42 23>:k), 0, ":k on a hash weeded out non-existing entries (1)";
183+
#?niecza skip 'TODO'
154184
is ~(%hash<42 23>:k), "", ":k on a hash weeded out non-existing entries (2)";
155185
}
156186

157187
# :v
158188
{
159189
my %hash = (0 => "A", 1 => "B");
160190

191+
#?niecza skip 'Excess arguments to KERNEL Hash.postcircumfix:<{ }>, unused named v'
161192
is +(%hash<0>:v), 1,
162193
":v on a hash returned an one-elem array";
194+
#?niecza skip 'Excess arguments to KERNEL Hash.postcircumfix:<{ }>, unused named v'
163195
is ~(%hash<0>:v), "A",
164196
":v on a hash returned the correct one-elem array";
165197

198+
#?niecza skip 'TODO'
166199
lives_ok {%hash<0>:v = "a"}, 'can assign to %hash<0>:v';
200+
#?niecza skip 'TODO'
167201
is %hash<0>, "a",
168202
":v on a hash returns lvalues (like normal subscripts do as well)";
169203

204+
#?niecza skip 'Excess arguments to KERNEL Hash.postcircumfix:<{ }>, unused named v'
170205
is +(%hash<0 1>:v), 2,
171206
":v on a hash returned a tow-elem array";
207+
#?niecza skip 'Excess arguments to KERNEL Hash.postcircumfix:<{ }>, unused named v'
172208
is ~(%hash<0 1>:v), "a B",
173209
":v on a hash returned the correct two-elem array";
174210

211+
#?niecza skip 'Excess arguments to KERNEL Hash.postcircumfix:<{ }>, unused named v'
175212
is +(%hash<42 23>:v), 0, ":v on a hash weeded out non-existing entries (1)";
213+
#?niecza skip 'Excess arguments to KERNEL Hash.postcircumfix:<{ }>, unused named v'
176214
is ~(%hash<42 23>:v), "", ":v on a hash weeded out non-existing entries (2)";
177215
}
178216

@@ -181,17 +219,21 @@ plan 64;
181219
{
182220
my @array = (42, Mu, 23);
183221

222+
#?niecza skip 'TODO'
184223
is +(@array[0,1,2]:kv), 6,
185224
"undefined but existing entries should not be weeded out (1)";
225+
#?niecza skip 'TODO'
186226
is ~(@array[0,1,2]:kv), "0 42 1 2 23",
187227
"undefined but existing entries should not be weeded out (2)";
188228
}
189229

190230
{
191231
my %hash = (0 => 42, 1 => Mu, 2 => 23);
192232

233+
#?niecza skip 'TODO'
193234
is +(%hash<0 1 2>:kv), 6,
194235
"undefined but existing entries should not be weeded out (3)";
236+
#?niecza skip 'TODO'
195237
is ~(%hash<0 1 2>:kv), "0 42 1 2 23",
196238
"undefined but existing entries should not be weeded out (4)";
197239
}

0 commit comments

Comments
 (0)