]> git.vpit.fr Git - perl/modules/re-engine-Plugin.git/blob - t/captures.t
Importing re-engine-Plugin-0.01.tar.gz
[perl/modules/re-engine-Plugin.git] / t / captures.t
1 =pod
2
3 Test the B<captures> method
4
5 =cut
6
7 use strict;
8
9 use feature ':5.10';
10
11 #use Test::More tests => 1;
12 use Test::More skip_all => 'TODO: implement';
13
14 use re::engine::Plugin (
15     comp => sub {
16         my $re = shift;
17     },
18     exec => sub {
19         my ($re, $str) = @_;
20
21         # 
22         #$re->captures( [ 1 .. 4 ] );
23         #$re->captures( sub {} );
24
25         $re->named_captures( );
26
27         1; # matched
28     }
29 );
30
31 if ("string" =~ /./g) {
32     cmp_ok $1, '==', 1337;
33     cmp_ok $+{named}, '==', 5;
34 }