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

« back to all changes in this revision

Viewing changes to t/default_links.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 Wiki::Toolkit::Formatter::UseMod;
 
3
use Test::More tests => 2;
 
4
 
 
5
my $wikitext = <<WIKITEXT;
 
6
 
 
7
http://external.example.com/
 
8
 
 
9
[http://external2.example.com foo]
 
10
 
 
11
WIKITEXT
 
12
 
 
13
my $formatter = Wiki::Toolkit::Formatter::UseMod->new;
 
14
 
 
15
my $html = $formatter->format( $wikitext );
 
16
 
 
17
like( $html,
 
18
      qr'<a href="http://external.example.com/">http://external.example.com/</a>',
 
19
      "external links with no title appear as expected" );
 
20
 
 
21
like( $html,
 
22
      qr'[<a href="http://external2.example.com/">foo</a>]',
 
23
      "external links with title appear as expected" );