# 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>
!! wikitext
<poem>
this
is
a
test
</poem>
!! html/php+tidy
<div class="poem">
<p>this<br />
is<br />
a<br />
test
</p>
</div>
!! end

!!test
  <poem> with recursive parsing
!!wikitext
<poem>
this ''is'' a '''test'''
</poem>
!! html/php+tidy
<div class="poem">
<p>this <i>is</i> a <b>test</b>
</p>
</div>
!!end


!!test
  <poem> with leading whitespace
!!wikitext
<poem>

   test

</poem>
!! html/php+tidy
<div class="poem">
<p><br />
&#160;&#160;&#160;test<br />
</p>
</div>
!!end

!!test
Horizontal rule
!!wikitext
<poem>
some
-----
text
</poem>
!!html/php+tidy
<div class="poem">
<p>some<br />
</p>
<hr />
<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
!! wikitext
<nowiki>
this
is
a
test
</nowiki>
!! html/php+tidy
<p>
this
is
a
test

</p>
!! end

!! test
  nested <poem><nowiki>
!! wikitext
<poem><nowiki>
this
is
a
test
</nowiki></poem>
!! html/php+tidy
<div class="poem">
<p><br />
this<br />
is<br />
a<br />
test<br />

</p>
</div>
!!end

!! test 5
  nested <poem><nowiki> with formatting
!! wikitext
<poem><nowiki>
this
'''is'''
a
test
</nowiki></poem>
!! html/php+tidy
<div class="poem">
<p><br />
this<br />
'''is'''<br />
a<br />
test<br />

</p>
</div>
!! end

!! test
Basic <poem> usage with style
!! wikitext
<poem style="border: 2px solid #d6d2c5; background-color: #f9f4e6; padding: 1em;">
A stately pleasure-dome decree:
Where Alph, the sacred river, ran
Through caverns measureless to man
Down to a sunless sea.
</poem>
!! html/php+tidy
<div style="border: 2px solid #d6d2c5; background-color: #f9f4e6; padding: 1em;" class="poem">
<p>A stately pleasure-dome decree:<br />
Where Alph, the sacred river, ran<br />
Through caverns measureless to man<br />
Down to a sunless sea.
</p>
</div>
!! end
