From ff1e6d1ac8e928a82cf27e78433ea6bf75afffcf Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Wed, 31 Jan 2007 08:23:25 +0000 Subject: [PATCH] Added more tests. --- t/bbcode.t | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/t/bbcode.t b/t/bbcode.t index 2f0b2c46..340cc44c 100644 --- a/t/bbcode.t +++ b/t/bbcode.t @@ -18,7 +18,7 @@ require 't/test.pl'; package OddMuse; -use Test::More tests => 7; +use Test::More tests => 15; clear_pages(); @@ -39,4 +39,23 @@ run_tests(split('\n',<<'EOT')); [size=test]this text is two sizes larger than normal[/size] [font=courier]this text is in the courier font[/font] this text is in the courier font +[url]yadda +[url]yadda +[quote]quoted text[/quote] +

quoted text

+[quote]first paragraph\n\nsecond paragraph[/quote] +

first paragraph

second paragraph

+[code]monospaced text[/code] +
monospaced text
+[code]monospaced\n\n text[/code] +
monospaced\n\n text
+EOT + +xpath_run_tests(split('\n',<<'EOT')); +[url]http://wikipedia.org[/url] +//a[@class="url http"][@href="http://wikipedia.org"][text()="http://wikipedia.org"] +[url=http://wikipedia.org]Wikipedia[/url] +//a[@class="url http"][@href="http://wikipedia.org"][text()="Wikipedia"] +[img]http://upload.wikimedia.org/wikipedia/commons/thumb/6/63/Wikipedia-logo.png/150px-Wikipedia-logo.png[/img] +//img[@class="url http"][@src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/63/Wikipedia-logo.png/150px-Wikipedia-logo.png"] EOT