File: paragraphs.t

package info (click to toggle)
libwiki-toolkit-formatter-usemod-perl 0.25-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 176 kB
  • sloc: perl: 258; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 485 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
use strict;
use Test::More tests => 2;

use Wiki::Toolkit::Formatter::UseMod;

my $formatter = Wiki::Toolkit::Formatter::UseMod->new;

# The CGI linebreak is \r\n, not \n.
my $wikitext = "\r\nThis is paragraph 1.\r\n\r\nThis is paragraph 2.\r\n";
my $html = $formatter->format( $wikitext );
like( $html, qr/<p>\s*This is paragraph 1./, "first paragraph detected" );
like( $html, qr/<p>\s*This is paragraph 2./,
      "second paragraph, separated from first by blank line, detected" );