7 if (($Config::Config{'extensions'} !~ /\bre\b/) ){
8 print "1..0 # Skip -- Perl configured without re module\n";
15 use Test::More; # test count at bottom of file
16 use re qw(is_regexp regexp_pattern regmust);
19 ok(is_regexp($qr),'is_regexp($qr)');
20 ok(!is_regexp(''),'is_regexp("")');
21 is((regexp_pattern($qr))[0],'foo','regexp_pattern[0]');
22 is((regexp_pattern($qr))[1],'i','regexp_pattern[1]');
23 is(regexp_pattern($qr),'(?i-xsm:foo)','scalar regexp_pattern');
24 ok(!regexp_pattern(''),'!regexp_pattern("")');
26 my $qr=qr/here .* there/x;
27 my ($anchored,$floating)=regmust($qr);
28 is($anchored,'here',"Regmust anchored - qr//");
29 is($floating,'there',"Regmust floating - qr//");
31 ($anchored,$floating)=regmust($foo);
32 is($anchored,undef,"Regmust anchored - non ref");
33 is($floating,undef,"Regmust anchored - non ref");
35 ($anchored,$floating)=regmust($foo);
36 is($anchored,undef,"Regmust anchored - ref");
37 is($floating,undef,"Regmust anchored - ref");
40 # New tests above this line, don't forget to update the test count below!
41 use Test::More tests => 12;