#!/usr/bin/perl
# $Id: 10-inline.t 284 2006-12-01 07:51:49Z chronos $
use Test::More tests => 61;
use strict;
use warnings;
use lib 't';
BEGIN { require "common.ph"; }
BEGIN { use_ok 'BBCode::Parser'; }
our $p = BBCode::Parser->new;
bbtest q(Simple example),
q(Simple example);
bbtest q([TEXT="Internal "]example),
q(Internal example),
q(Internal example);
bbtest q(Multi[BR]Line),
qq(Multi
Line);
bbtest qq(Multi\nLine),
qq(Multi
\nLine);
bbtest q([ENT=amp]),
q(&);
bbtest q([B]Bold[/B] text),
q(Bold text);
bbtest q([I]Italic[/I] text),
q(Italic text);
bbtest q([U]Underlined[/U] text),
q(Underlined text);
bbtest q([S]Strike-through[/S] text),
q(Strike-through text);
bbtest q([Q]Quoted[/Q] text),
q(Quoted
text);
bbtest q([TT]Teletype[/TT] text),
q(Teletype text);
bbtest q(S[SUP]uper[/SUP]script text),
q(Superscript text);
bbtest q(S[SUB]ub[/SUB]script text),
q(Subscript text);
bbtest q([FONT=Verdana]Named-font[/FONT] text),
q(Named-font text);
bbtest q([FONT="Times New Roman"]Named-font[/FONT] text),
q(Named-font text);
bbtest q([FONT, SIZE=10pt]Named-size[/FONT] text),
q(Named-size text);
bbtest q([SIZE=6pt]Tiny[/SIZE] text),
q([FONT, SIZE=8pt]Tiny[/FONT] text),
q(Tiny text);
bbtest q([FONT, COLOR=blue]Named-color[/FONT] text),
q(Named-color text);
bbtest q([FONT, COLOR=#cf]Hex color[/FONT] text),
q([FONT, COLOR=#cfcfcf]Hex color[/FONT] text),
q(Hex color text);
bbtest q([FONT, COLOR="rgba(0%,0%,100%,75%)"]RGBA color[/FONT] text),
q(RGBA color text);
bbtest q([COLOR=red]COLOR auto-replace[/COLOR]),
q([FONT, COLOR=red]COLOR auto-replace[/FONT]),
q(COLOR auto-replace);
bbtest q([FONT=Verdana, SIZE=10pt, COLOR=blue]Multi-attribute FONT[/FONT]),
q(Multi-attribute FONT);
bbtest q([URL=http://slashdot.org/]Linked[/URL] text),
q(Linked text);
bbtest q(More [EMAIL=mailto:chronos@chronos-tachyon.net]linked[/EMAIL] text),
q(More linked text);
bbtest q(Image: [IMG=http://chronos-tachyon.net/images/me/20040419-closeup.jpg, ALT="[My Face]", W=818, H=958, TITLE="A picture of Chronos Tachyon"]),
q(Image:
);
bbtest q([URL=http://slashdot.org/, FOLLOW=1]Linked[/URL] text),
q(Linked text);
$p->set(follow_override => 1);
bbtest q([URL=http://slashdot.org/, FOLLOW=1]Linked[/URL] text),
q(Linked text);
bbtest q([URL=http://www.example.org/?test=foo]Linked[/URL] text),
q([URL=http://www.example.org/?test\=foo]Linked[/URL] text),
q(Linked text);
$p->set(follow_links => 1);
bbtest q([URL=slashdot.org]Linked[/URL] text),
q([URL=http://slashdot.org/]Linked[/URL] text),
q(Linked text);
bbtest q(More [EMAIL=chronos@chronos-tachyon.net]linked[/EMAIL] text),
q(More [EMAIL=mailto:chronos@chronos-tachyon.net]linked[/EMAIL] text),
q(More linked text);
# vim:set ft=perl: