]> git.vpit.fr Git - perl/modules/re-engine-Plugin.git/blob - t/methods/stash.t
Importing re-engine-Plugin-0.02.tar.gz
[perl/modules/re-engine-Plugin.git] / t / methods / stash.t
1 =pod
2
3 Test the C<stash> method
4
5 =cut
6
7 use strict;
8 use Test::More tests => 4;
9
10 use re::engine::Plugin (
11     comp => sub {
12         my ($re) = @_;
13
14         my $sv = [ qw( a o e u ) ];
15
16         $re->stash( $sv );
17     },
18     exec => sub {
19         my ($re, $str) = @_;
20
21         my $stash = $re->stash;
22         my %h = qw( 0 a 1 o 2 e 3 u );
23         for (keys %h) {
24             is($h{$_}, $stash->[$_]);
25         }
26     }
27 );
28
29 "ook" =~ /eek/;