|
|
|
@ -4,7 +4,7 @@ use strict;
|
|
|
|
|
use warnings; |
|
|
|
|
use utf8; |
|
|
|
|
|
|
|
|
|
use Test::More tests => 10; |
|
|
|
|
use Test::More tests => 14; |
|
|
|
|
use Text::Dokuwiki::Regexps; |
|
|
|
|
|
|
|
|
|
my $rx = $Text::Dokuwiki::Regexps::regexps; |
|
|
|
@ -42,4 +42,19 @@ $matched = 'Header only';
|
|
|
|
|
is($matches[0], $matched); |
|
|
|
|
is($matches[1], '-------------'); |
|
|
|
|
|
|
|
|
|
$text = <<'TEXT'; |
|
|
|
|
|
|
|
|
|
Sample paragraph |
|
|
|
|
|
|
|
|
|
TEXT |
|
|
|
|
$matched = " Sample paragraph\n"; |
|
|
|
|
@matches = $text =~ m/$rx->{paragraph}/; |
|
|
|
|
is(scalar @matches, 1); |
|
|
|
|
is($matches[0], $matched); |
|
|
|
|
|
|
|
|
|
$text = 'Simple text line'; |
|
|
|
|
@matches = $text =~ m/$rx->{paragraph}/; |
|
|
|
|
is(scalar @matches, 1); |
|
|
|
|
is($matches[0], $text); |
|
|
|
|
|
|
|
|
|
exit 0; |
|
|
|
|