~ubuntu-branches/ubuntu/vivid/libwiki-toolkit-formatter-usemod-perl/vivid

« back to all changes in this revision

Viewing changes to t/paragraphs.t

  • Committer: Bazaar Package Importer
  • Author(s): Dominic Hargreaves
  • Date: 2006-10-20 11:36:52 UTC
  • Revision ID: james.westby@ubuntu.com-20061020113652-9rs9i0ii0if52qff
Tags: upstream-0.20
ImportĀ upstreamĀ versionĀ 0.20

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
use strict;
 
2
use Test::More tests => 2;
 
3
 
 
4
use Wiki::Toolkit::Formatter::UseMod;
 
5
 
 
6
my $formatter = Wiki::Toolkit::Formatter::UseMod->new;
 
7
 
 
8
# The CGI linebreak is \r\n, not \n.
 
9
my $wikitext = "\r\nThis is paragraph 1.\r\n\r\nThis is paragraph 2.\r\n";
 
10
my $html = $formatter->format( $wikitext );
 
11
like( $html, qr/<p>\s*This is paragraph 1./, "first paragraph detected" );
 
12
like( $html, qr/<p>\s*This is paragraph 2./,
 
13
      "second paragraph, separated from first by blank line, detected" );