summaryrefslogtreecommitdiff
path: root/extensions/Poem/poemParserTests.txt
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
commit08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch)
tree577a29fb579188d16003a209ce2a2e9c5b0aa2bd /extensions/Poem/poemParserTests.txt
parentcacc939b34e315b85e2d72997811eb6677996cc1 (diff)
Update to MediaWiki 1.21.1
Diffstat (limited to 'extensions/Poem/poemParserTests.txt')
-rw-r--r--extensions/Poem/poemParserTests.txt142
1 files changed, 142 insertions, 0 deletions
diff --git a/extensions/Poem/poemParserTests.txt b/extensions/Poem/poemParserTests.txt
new file mode 100644
index 00000000..266dd614
--- /dev/null
+++ b/extensions/Poem/poemParserTests.txt
@@ -0,0 +1,142 @@
+# Force the test runner to ensure the extension is loaded
+!! hooks
+poem
+!! endhooks
+
+#Regression tests for existing functionality, to ensure nothing was broken.
+!! test
+<poem>
+!! input
+<poem>
+this
+is
+a
+test
+</poem>
+!! result
+<div class="poem">
+<p>this<br />
+is<br />
+a<br />
+test
+</p>
+</div>
+
+!! end
+
+!!test
+ <poem> with recursive parsing
+!!input
+<poem>
+this ''is'' a '''test'''
+</poem>
+!! result
+<div class="poem">
+<p>this <i>is</i> a <b>test</b>
+</p>
+</div>
+
+!!end
+
+
+!!test
+ <poem> with leading whitespace
+!!input
+<poem>
+
+ test
+
+</poem>
+!! result
+<div class="poem">
+<p><br />
+&#160;&#160;&#160;test<br />
+</p>
+</div>
+
+!!end
+
+!!test
+Horizontal rule
+!!input
+<poem>
+some
+-----
+text
+</poem>
+!!result
+<div class="poem">
+<p>some<br />
+</p>
+<hr /><br />
+<p>text
+</p>
+</div>
+
+!!end
+
+#test for new poem/nowiki feature; should fail without new enhancement.
+!! test 2
+example of <nowiki> without <poem>
+!!options
+disabled
+!! input
+<nowiki>
+this
+is
+a
+test
+</nowiki>
+!! result
+<p>
+this
+is
+a
+test
+
+</p>
+!! end
+
+!! test
+ nested <poem><nowiki>
+!! input
+<poem><nowiki>
+this
+is
+a
+test
+</nowiki></poem>
+!! result
+<div class="poem">
+<p><br />
+this<br />
+is<br />
+a<br />
+test<br />
+
+</p>
+</div>
+
+!!end
+
+!! test 5
+ nested <poem><nowiki> with formatting
+!! input
+<poem><nowiki>
+this
+'''is'''
+a
+test
+</nowiki></poem>
+!! result
+<div class="poem">
+<p><br />
+this<br />
+'''is'''<br />
+a<br />
+test<br />
+
+</p>
+</div>
+
+!! end