# Copyright (C) 2006–2015  Alex Schroeder <alex@gnu.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

require './t/test.pl';
package OddMuse;
use Test::More tests => 59;

# Using add_module causes problems during startup
# add_module('usemod.pl');
# add_module('aggregate.pl');
do 'modules/usemod.pl';
do 'modules/markup.pl';
InitVariables();

run_tests(split('\n',<<'EOT'));
foo
foo
/foo/
<i>foo</i>
5km/h or 6km/h
5km/h or 6km/h
/foo/ bar
<i>foo</i> bar
/foo bar 5/
<i>foo bar 5</i>
6/22/2004
6/22/2004
#!/bin/sh
#!/bin/sh
put it in ~/elisp/
put it in ~/elisp/
see /usr/bin/
see /usr/bin/
to /usr/local/share/perl/!
to /usr/local/share/perl/!
we shall laugh/cry/run around naked
we shall laugh/cry/run around naked
da *foo*
da <b>foo</b>
da *foo bar 6*
da <b>foo bar 6</b>
da a*b is not * whatever
da a*b is not * whatever
da a*b is not* whatever
da a*b is not* whatever
da a *b is not * whatever
da a *b is not * whatever
da a *b is not* whatever
da a <b>b is not</b> whatever
_foo_
<em style="text-decoration: underline; font-style: normal;">foo</em>
foo_bar_baz
foo_bar_baz
_foo bar 4_
<em style="text-decoration: underline; font-style: normal;">foo bar 4</em>
this -> that
this &#x2192;&#x00a0;that
and this...
and this&#x2026;
foo---bar
foo&#x2014;bar
foo -- bar
foo &#x2013; bar
foo\n----\nbar
foo <hr /><p>bar</p>
foo ##bar+## baz
foo <code>bar+</code> baz
foo %%bar+%% baz
foo <span>bar+</span> baz
##http://www.example.com##
<code>http://www.example.com</code>
%%http://www.example.com%%
<span>http://www.example.com</span>
and **this\nis!** me
and <b>this\nis!</b> me
and //this\nis!// me
and <i>this\nis!</i> me
and __this\nis!__ me
and <em style="text-decoration: underline; font-style: normal;">this\nis!</em> me
and ~~this\nis!~~ me
and <em>this\nis!</em> me
um\n{{{\ncode\n}}} here
um <pre>code\n</pre><p>here</p>
um\n{{{\ncode\n}}}\n here
um <pre>code\n</pre><pre> here</pre>
um\n{{{\ncode\n}}} 	  \n here
um <pre>code\n</pre><pre> here</pre>
um\n{{{\ncode\n\nmore code\n}}} here
um <pre>code\n\nmore code\n</pre><p>here</p>
um {{{code}}} here
um {{{code}}} here
or //this// and\n//that//
or <i>this</i> and <i>that</i>
__ and 7000 chars xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxx
______
______
____ and __
____ and __
//// and //
//// and //
i think //the paragraph should be the limit\n\nright?//
i think //the paragraph should be the limit<p>right?//</p>
'hi'
&#x2018;hi&#x2019;
say 'hi' to mom
say &#x2018;hi&#x2019; to mom
say 'hi!' to mom
say &#x2018;hi!&#x2019; to mom
i'm tired
i&#x2019;m tired
"hi"
&#x201c;hi&#x201d;
say "hi" to mom
say &#x201c;hi&#x201d; to mom
say "hi!" to mom
say &#x201c;hi!&#x201d; to mom
i"m tired
i"m tired
He said, "[w]hen I voice complaints..."
He said, &#x201c;[w]hen I voice complaints&#x2026;&#x201d;
[foo]'s problem
[foo]&#x2019;s problem
EOT

$MarkupQuotes = 0;
run_tests(q{"Get lost!", they say, and I answer: "I'm not 'lost'!"},
	  q{"Get lost!", they say, and I answer: "I'm not 'lost'!"});
$MarkupQuotes = 1;
run_tests(q{"Get lost!", they say, and I answer: "I'm not 'lost'!"},
	  q{&#x201c;Get lost!&#x201d;, they say, and I answer: &#x201c;I&#x2019;m not &#x2018;lost&#x2019;!&#x201d;});
$MarkupQuotes = 2;
run_tests(q{"Get lost!", they say, and I answer: "I'm not 'lost'!"},
	  q{&#x00ab;Get lost!&#x00bb;, they say, and I answer: &#x00ab;I&#x2019;m not &#x2039;lost&#x203a;!&#x00bb;});
$MarkupQuotes = 3;
run_tests(q{"Get lost!", they say, and I answer: "I'm not 'lost'!"},
	  q{&#x00bb;Get lost!&#x00ab;, they say, and I answer: &#x00bb;I&#x2019;m not &#x203a;lost&#x2039;!&#x00ab;});
$MarkupQuotes = 4;
run_tests(q{"Get lost!", they say, and I answer: "I'm not 'lost'!"},
	  q{&#x201e;Get lost!&#x201c;, they say, and I answer: &#x201e;I&#x2019;m not &#x201a;lost&#x2018;!&#x201c;});
