Skip to content

Commit dbd529b

Browse files
add tests for checking $¢, the current match state.
1 parent cd67f6e commit dbd529b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

S05-capture/match-object.t

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use Test;
44
# this file should become the test for systematically testing
55
# Match objects. Exception: .caps and .chunks are tested in caps.t
66

7-
plan 18;
7+
plan 21;
88

99
ok 'ab12de' ~~ /\d+/, 'match successful';
1010
is $/.WHAT.gist, Match.gist, 'got right type';
@@ -30,3 +30,10 @@ is $/.kv.elems, 0, '.kv (empty)';
3030
nok 'abde' ~~ /\d/, 'no match';
3131
nok $/.Bool, 'failed match is False';
3232
is $/.Str, '', 'false match stringifies to empty string';
33+
34+
#?niecza 3 todo '$¢ is still named $/'
35+
#?rakudo 3 eval 'Non-declarative sigil is missing its name at line 1, near "$\x{a2} }/\n"'
36+
my $c;
37+
ok 'abc' ~~ /.{ $c =}/, 'current match state';
38+
is $c.WHAT.gist, Cursor.gist, 'got right type';
39+
ok defined($c.pos), '.pos';

0 commit comments

Comments
 (0)