#!/usr/bin/perl # $Id: 40-stress.t 284 2006-12-01 07:51:49Z chronos $ use Test::More tests => 27; use strict; use warnings; use lib 't'; BEGIN { require "common.ph"; } BEGIN { use_ok 'BBCode::Parser'; } our $p = BBCode::Parser->new; bbtest q([TEXT="[FOO]"]), q([[FOO]]), q([FOO]); bbtest q([TEXT="[Foo, Bar"]), q([[Foo, Bar), q([Foo, Bar); bbtest q([TEXT="&foo"]), q([ENT=amp]foo), q(&foo); bbtest q([TEXT="]Breakout attempt[/FONT]), q(Breakout attempt); bbtest q([LIST][*]One[*]Two), q([LIST][LI]One[/LI][LI]Two[/LI][/LIST]), qq(); bbtest <<'END_A', [FONT SIZE = 10\ pt COLOR = "r"'ed' FACE="Times \ New \ Roman\ " ]Text[/FONT] END_A <<'END_B', [FONT="Times New Roman", SIZE=10pt, COLOR=red]Text[/FONT] END_B <<'END_C'; Text END_C $p->set(follow_override => 1); bbtest <<'END_A', [ URL = http://slashdot.org/ FOLLOW = yes ]slashdot.org[ / URL ] END_A <<'END_B', [URL=http://slashdot.org/, FOLLOW=1]slashdot.org[/URL] END_B <<'END_C'; slashdot.org END_C # vim:set ft=perl: