6 use Test::More tests => 6 * 2;
14 use re::engine::Plugin comp => sub { ++$comp[0] },
15 exec => sub { ++$exec[0]; 0 };
18 is "@comp", '1 0', 'is compiled with the first engine';
19 is "@exec", '0 0', 'not executed yet';
23 is "@comp", '1 0', 'was compiled with the first engine';
24 is "@exec", '1 0', 'is executed with the first engine';
27 use re::engine::Plugin comp => sub { ++$comp[1] },
28 exec => sub { ++$exec[1]; 0 };
31 is "@comp", '1 0', 'was still compiled with the first engine';
32 is "@exec", '2 0', 'is executed with the first engine again';
35 is "@comp", '1 1', 'is compiled with the second engine';
36 is "@exec", '2 0', 'not executed since last time';
40 is "@comp", '1 1', 'was compiled with the second engine';
41 is "@exec", '2 1', 'is executed with the second engine';
47 is "@comp", '1 1', 'was still compiled with the second engine';
48 is "@exec", '2 2', 'is executed with the second engine again (and not with "re \'debug\'")';