Skip to content

Commit 9f5a497

Browse files
committed
fudge comb.t and symbolic-deref.t for rakudo
1 parent 3d679db commit 9f5a497

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

S02-names/symbolic-deref.t

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ plan 22;
3737
is &::($b_var)(), 42, 'basic symbolic code dereferentiation works';
3838
}
3939

40+
#?rakudo skip 'NYI'
4041
{
4142
$pugs::is::cool = 42;
4243
my $cool = "cool";
@@ -47,6 +48,7 @@ plan 22;
4748
eval_dies_ok('$::($pugsis)cool', '$::($foo)bar is illegal');
4849
}
4950

51+
#?rakudo skip 'NYI'
5052
{
5153
my $result;
5254

@@ -66,6 +68,7 @@ plan 22;
6668
}
6769

6870
# Symbolic dereferentiation of globals
71+
#?rakudo skip 'NYI'
6972
{
7073
sub GLOBAL::a_global_sub () { 42 }
7174
is &::("*::a_global_sub")(), 42,
@@ -77,6 +80,7 @@ plan 22;
7780
}
7881

7982
# Symbolic dereferentiation of globals *without the star*
83+
#?rakudo skip 'NYI'
8084
{
8185
cmp_ok $::("*IN"), &infix:<===>, $*IN,
8286
"symbolic dereferentiation of globals works (3)";
@@ -98,11 +102,13 @@ plan 22;
98102
}
99103

100104
# Symbolic dereferentiation of type vars
105+
#?rakudo skip 'NYI'
101106
{
102107
cmp_ok ::Array, &infix:<===>, ::("Array"),
103108
"symbolic dereferentiation of type vars works (1)";
104109
}
105110

111+
#?rakudo skip 'NYI'
106112
{
107113
class A::B::C {};
108114
my $ok = ::A::B::C === ::A::("B")::C;
@@ -112,6 +118,7 @@ plan 22;
112118
# Symbolic dereferentiation syntax should work with $?SPECIAL etc. too.
113119
# Note: I'm not 100% sure this is legal syntax. If it turns out it isn't, we'll
114120
# have to s/ok/dies_ok/.
121+
#?rakudo skip 'NYI'
115122
{
116123
try { this_will_die_and_therefore_set_dollar_exclamation_mark };
117124
ok $::("!"), "symbolic dereferentiation works with special chars (1)";

S32-str/comb.t

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ is( "a\c[COMBINING DOT ABOVE, COMBINING DOT BELOW]b".comb,
2525

2626

2727
#?pugs skip "todo: Str.comb"
28+
#?rakudo skip '.comb with limit'
2829
{
2930
my Str $hair = "Th3r3 4r3 s0m3 numb3rs 1n th1s str1ng";
3031
is $hair.comb(/\d+/), <3 3 4 3 0 3 3 1 1 1>, 'no limit returns all matches';
@@ -50,6 +51,7 @@ is( "a\c[COMBINING DOT ABOVE, COMBINING DOT BELOW]b".comb,
5051
}
5152

5253
#?pugs todo 'feature'
54+
#?rakudo skip '.comb with limit'
5355
is "a ab bc ad ba".comb(/\S*a\S*/, 2), <a ab>, 'matcher and limit';
5456

5557
is "forty-two".comb().join('|'), 'f|o|r|t|y|-|t|w|o', q{Str.comb(/./)};
@@ -67,13 +69,15 @@ is (<a ab>, <bc ad ba>).comb(m:Perl5/\S*a\S*/), <a ab ad ba>,
6769

6870
# needed: comb a filehandle
6971

72+
#?rakudo skip 'nom'
7073
{
7174
my @l = 'a23 b c58'.comb(/\w(\d+)/);
7275
is @l.join('|'), 'a23|c58', 'basic comb-without-matches sanity';
7376
isa_ok(@l[0], Str, 'first item is a Str');
7477
isa_ok(@l[1], Str, 'second item is a Str');
7578
}
7679

80+
#?rakudo skip 'nom'
7781
{
7882
my @l = 'a23 b c58'.comb(/\w(\d+)/, :match);
7983
is @l.join('|'), 'a23|c58', 'basic comb-with-matches sanity';
@@ -87,6 +91,7 @@ is (<a ab>, <bc ad ba>).comb(m:Perl5/\S*a\S*/), <a ab ad ba>,
8791

8892
# RT #66340
8993
#?niecza skip 'Huh?'
94+
#?rakudo skip 'nom'
9095
{
9196
my $expected_reason = rx/^'No applicable candidates '/;
9297

@@ -101,6 +106,7 @@ is (<a ab>, <bc ad ba>).comb(m:Perl5/\S*a\S*/), <a ab ad ba>,
101106
ok "$!" ~~ $expected_reason, '.comb({...}) dies for the expected reason';
102107
}
103108

109+
#?rakudo skip 'nom'
104110
{
105111
is comb( /./ , "abcd"), <a b c d>, 'Subroutine form default limit';
106112
is comb(/./ , "abcd" , 2 ), <a b>, 'Subroutine form with supplied limit';

0 commit comments

Comments
 (0)