Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 49 lines (32 sloc) 0.848 kb
297e783 [t] and [t/spec]
moritz authored
1 use v6;
2 use Test;
3
4 =begin kwid
5
0e29b88 [t/spec] Update S05 tests to avoid deprecated rules, test <?> and <!>.
pmichaud authored
6 regex r { <?> | x <r> }
297e783 [t] and [t/spec]
moritz authored
7
8 "x" ~~ /<r>$/ should match "x", not "".
9
10 =end kwid
11
12 plan 20;
13
820912f [t/spec] more smartlinks; less than 100 remain without smartlinks
moritz authored
14 # L<S05/Extensible metasyntax (C<< <...> >>)>
297e783 [t] and [t/spec]
moritz authored
15
4806917 @moritz [recursive.t] niecza++ implements LTM, and thus detected that this te…
moritz authored
16 my regex r { <?> || x <&r> }
297e783 [t] and [t/spec]
moritz authored
17
e71ad79 [t/spec] my-scope a few regexes, and fudge for rakudo
moritz authored
18 ok "" ~~ /<&r>/, '"" ~~ /<r>/ matched';
297e783 [t] and [t/spec]
moritz authored
19 is $/, "", 'with ""';
20 is $/.from, 0, 'from 0';
21 is $/.to, 0, 'to 0';
22
e71ad79 [t/spec] my-scope a few regexes, and fudge for rakudo
moritz authored
23 ok "x" ~~ /<&r>/, '"x" ~~ /<r>/ matched';
297e783 [t] and [t/spec]
moritz authored
24 is $/, "", 'with ""';
25 is $/.from, 0, 'from 0';
26 is $/.to, 0, 'to 0';
27
e71ad79 [t/spec] my-scope a few regexes, and fudge for rakudo
moritz authored
28 ok "x" ~~ /<&r>$/, '"x" ~~ /<r>$/ matched';
297e783 [t] and [t/spec]
moritz authored
29 is $/, "x", 'with "x"';
30 is $/.from, 0, 'from 0';
31 is $/.to, 1, 'to 1';
32
e71ad79 [t/spec] my-scope a few regexes, and fudge for rakudo
moritz authored
33 ok "xx" ~~ /<&r>$/, '"xx" ~~ /<r>$/ matched';
297e783 [t] and [t/spec]
moritz authored
34 is $/, "xx", 'with "xx"';
35 is $/.from, 0, 'from 0';
36 is $/.to, 2, 'to 2';
37
38
0e29b88 [t/spec] Update S05 tests to avoid deprecated rules, test <?> and <!>.
pmichaud authored
39 # rule r2 { <?> | <r2> x }
e71ad79 [t/spec] my-scope a few regexes, and fudge for rakudo
moritz authored
40 my regex r2 { <?> | <&r2> x }
297e783 [t] and [t/spec]
moritz authored
41
e71ad79 [t/spec] my-scope a few regexes, and fudge for rakudo
moritz authored
42 ok "x" ~~ /<&r2>$/, '"x" ~~ /<r2>$/ matched';
297e783 [t] and [t/spec]
moritz authored
43 is $/, "x", 'with "x"';
44 is $/.from, 0, 'from 0';
45 is $/.to, 1, 'to 1';
46
7f29bc5 [t/spec] Add vim: lines everywhere.
kyle authored
47
48 # vim: ft=perl6
Something went wrong with that request. Please try again.