Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 40 lines (25 sloc) 0.745 kb
cd852d7 [t] move noncap.t to spec/, added deprecation comment to junction_functi...
moritz authored
1 use v6;
2 use Test;
3
4 =begin pod
5
6 This file was originally derived from the perl5 CPAN module Perl6::Rules,
7 version 0.3 (12 Apr 2004), file t/noncap.t.
8
9 =end pod
10
288e046 [t] and [t/spec]
moritz authored
11 # L<S05/Bracket rationalization/"[...] is no longer a character class.
12 # It now delimits a non-capturing group.">
13
a7f8d6d [t] merged rules_with_embedded_parrot.t into no-capturing.t
moritz authored
14 plan 9;
cd852d7 [t] move noncap.t to spec/, added deprecation comment to junction_functi...
moritz authored
15
16 my $str = "abbbbbbbbc";
17
18 ok($str ~~ m{a(b+)c}, 'Matched 1');
19 ok($/, 'Saved 1');
20 is($/, $str, 'Grabbed all 1');
32590b6 @jnthn Bring a test in line with the spec.
jnthn authored
21 is($/[0], substr($str,1,*-1), 'Correctly captured 1');
cd852d7 [t] move noncap.t to spec/, added deprecation comment to junction_functi...
moritz authored
22
23 ok($str ~~ m{a[b+]c}, 'Matched 2');
24 ok($/, 'Saved 2');
25 is($/, $str, 'Grabbed all 2');
26 ok(!defined($/[0]), "Correctly didn't capture 2");
27
a7f8d6d [t] merged rules_with_embedded_parrot.t into no-capturing.t
moritz authored
28 {
8440bac [t/spec] spec-updated non-capturing.t
moritz authored
29 my rule abc {abc}
a7f8d6d [t] merged rules_with_embedded_parrot.t into no-capturing.t
moritz authored
30
8440bac [t/spec] spec-updated non-capturing.t
moritz authored
31 my rule once {<&abc>}
a7f8d6d [t] merged rules_with_embedded_parrot.t into no-capturing.t
moritz authored
32
8440bac [t/spec] spec-updated non-capturing.t
moritz authored
33 my rule mumble {<notabc>}
a7f8d6d [t] merged rules_with_embedded_parrot.t into no-capturing.t
moritz authored
34
8440bac [t/spec] spec-updated non-capturing.t
moritz authored
35 ok("abcabcabcabcd" ~~ m/<&once>/, 'Once match');
cd852d7 [t] move noncap.t to spec/, added deprecation comment to junction_functi...
moritz authored
36 }
37
7f29bc5 [t/spec] Add vim: lines everywhere.
kyle authored
38
39 # vim: ft=perl6
Something went wrong with that request. Please try again.