1 # Copyright (C) 2006, 2007 Alex Schroeder <alex@emacswiki.org>
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the
15 # Free Software Foundation, Inc.
16 # 59 Temple Place, Suite 330
17 # Boston, MA 02111-1307 USA
21 use Test::More tests => 44;
25 add_module('usemod.pl');
29 run_tests(split('\n',<<'EOT'));
31 <ul><li><em>one</em><ul><li>two</li></ul></li></ul>
33 <ol><li>one</li><li>two</li></ol>
35 <ul><li>one</li></ul><ol><li>two</li></ol>
37 <ol><li>one</li></ol><p>#two</p>
38 # one\n# two\n## one and two\n## two and three\n# three
39 <ol><li>one</li><li>two<ol><li>one and two</li><li>two and three</li></ol></li><li>three</li></ol>
40 # one and #\n# two and # more
41 <ol><li>one and #</li><li>two and # more</li></ol>
42 : one\n: two\n:: one and two\n:: two and three\n: three
43 <dl class="quote"><dt /><dd>one</dd><dt /><dd>two<dl class="quote"><dt /><dd>one and two</dd><dt /><dd>two and three</dd></dl></dd><dt /><dd>three</dd></dl>
44 : one and :)\n: two and :) more
45 <dl class="quote"><dt /><dd>one and :)</dd><dt /><dd>two and :) more</dd></dl>
47 <dl class="quote"><dt /><dd>one</dd></dl><p>:two</p>
49 <dl><dt>one</dt><dd>eins ;two:zwei</dd></dl>
50 ; one:eins\n\n; two:zwei
51 <dl><dt>one</dt><dd>eins</dd><dt>two</dt><dd>zwei</dd></dl>
53 <dl><dt>a</dt><dd>b: c<dl><dt>x</dt><dd>y: z</dd></dl></dd></dl>
54 * foo <b>bold\n* bar </b>
55 <ul><li>foo <b>bold</b></li><li>bar </li></ul>
56 This is ''emphasized''.
57 This is <em>emphasized</em>.
59 This is <strong>strong</strong>.
60 This is ''longer emphasized'' text.
61 This is <em>longer emphasized</em> text.
62 This is '''longer strong''' text.
63 This is <strong>longer strong</strong> text.
64 This is '''''emphasized and bold''''' text.
65 This is <strong><em>emphasized and bold</em></strong> text.
66 This is ''emphasized '''and bold''''' text.
67 This is <em>emphasized <strong>and bold</strong></em> text.
68 This is '''bold ''and emphasized''''' text.
69 This is <strong>bold <em>and emphasized</em></strong> text.
70 This is ''emphasized text containing '''longer strong''' text''.
71 This is <em>emphasized text containing <strong>longer strong</strong> text</em>.
72 This is '''strong text containing ''emph'' text'''.
73 This is <strong>strong text containing <em>emph</em> text</strong>.
75 <table class="user"><tr class="odd first"><td>one</td></tr></table>
77 <table class="user"><tr class="odd first"><td>one</td><td align="left"> </td></tr></table>
79 <table class="user"><tr class="odd first"><td align="center">one <em>two</em></td></tr></table>
81 <table class="user"><tr class="odd first"><td align="center">one two </td></tr></table>
82 introduction\n\n||one||two||three||\n||||one two||three||
83 introduction<table class="user"><tr class="odd first"><td>one</td><td>two</td><td>three</td></tr><tr class="even"><td colspan="2">one two</td><td>three</td></tr></table>
84 ||one||two||three||\n||||one two||three||\n\nfooter
85 <table class="user"><tr class="odd first"><td>one</td><td>two</td><td>three</td></tr><tr class="even"><td colspan="2">one two</td><td>three</td></tr></table><p>footer</p>
86 ||one||two||three||\n||||one two||three||\n\nfooter
87 <table class="user"><tr class="odd first"><td>one</td><td>two</td><td>three</td></tr><tr class="even"><td colspan="2">one two</td><td>three</td></tr></table><p>footer</p>
88 || one|| two|| three||\n|||| one two|| three||\n\nfooter
89 <table class="user"><tr class="odd first"><td align="right">one</td><td align="right">two</td><td align="right">three</td></tr><tr class="even"><td colspan="2" align="right">one two</td><td align="right">three</td></tr></table><p>footer</p>
90 ||one ||two ||three ||\n||||one two ||three ||\n\nfooter
91 <table class="user"><tr class="odd first"><td align="left">one </td><td align="left">two </td><td align="left">three </td></tr><tr class="even"><td colspan="2" align="left">one two </td><td align="left">three </td></tr></table><p>footer</p>
92 || one || two || three ||\n|||| one two || three ||\n\nfooter
93 <table class="user"><tr class="odd first"><td align="center">one </td><td align="center">two </td><td align="center">three </td></tr><tr class="even"><td colspan="2" align="center">one two </td><td align="center">three </td></tr></table><p>footer</p>
94 introduction\n\n||one||two||three||\n||||one two||three||\n\nfooter
95 introduction<table class="user"><tr class="odd first"><td>one</td><td>two</td><td>three</td></tr><tr class="even"><td colspan="2">one two</td><td>three</td></tr></table><p>footer</p>
99 <pre> source\n etc</pre>
101 <pre> source\n \n etc</pre>
102 source\n \n etc\n\nother
103 <pre> source\n \n etc</pre><p>other</p>
113 <pre> == nada ==</pre>
115 <h2>[[Free Link]]</h2>
118 $UseModMarkupInTitles = 1;
120 run_tests(split('\n',<<'EOT'));