#!perl use strict; use warnings; use Test::More tests => 4; use Text::WikiFormat; my $wikitext = <<'WIKI'; I download code from http://www.cpan.org/ or ftp://ftp.cpan.org/ and email mailto:chromatic@example.com WIKI my $htmltext = Text::WikiFormat::format( $wikitext, {}, { extended => 1, absolute_links => 1 } ); is( $htmltext, qq|

I download code from http://www.cpan.org/ | . qq|or ftp://ftp.cpan.org/ and
| . "\n" . q|email mailto:chromatic@example.com

| . "\n", 'Picking up absolute links' ); $htmltext = Text::WikiFormat::format( $wikitext, {}, { extended => 1, absolute_links => 0 } ); is( $htmltext, q|

I download code from http://www.cpan.org/ or ftp://ftp.cpan.org/ and
| . "\n" . q|email mailto:chromatic@example.com

| . "\n", q|Doesn't pick up links when absolute_links is off| ); $wikitext = "this is a moose:notalink"; $htmltext = Text::WikiFormat::format( $wikitext, {}, { extended => 1, absolute_links => 1 } ); is( $htmltext, qq|

this is a moose:notalink

\n|, q|Doesn't pick up things that might look like links| ); $htmltext = Text::WikiFormat::format( $wikitext, {schemas => ['moose']}, { extended => 1, absolute_links => 1 } ); is( $htmltext, qq|

this is a moose:notalink

\n|, q|Schema tag allows specifying what is a link| );