markup.t 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. # Copyright (C) 2006–2015 Alex Schroeder <alex@gnu.org>
  2. #
  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 3 of the License, or
  6. # (at your option) any later version.
  7. #
  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.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. require 't/test.pl';
  16. package OddMuse;
  17. use Test::More tests => 59;
  18. # Using add_module causes problems during startup
  19. # add_module('usemod.pl');
  20. # add_module('aggregate.pl');
  21. do 'modules/usemod.pl';
  22. do 'modules/markup.pl';
  23. InitVariables();
  24. run_tests(split('\n',<<'EOT'));
  25. foo
  26. foo
  27. /foo/
  28. <i>foo</i>
  29. 5km/h or 6km/h
  30. 5km/h or 6km/h
  31. /foo/ bar
  32. <i>foo</i> bar
  33. /foo bar 5/
  34. <i>foo bar 5</i>
  35. 6/22/2004
  36. 6/22/2004
  37. #!/bin/sh
  38. #!/bin/sh
  39. put it in ~/elisp/
  40. put it in ~/elisp/
  41. see /usr/bin/
  42. see /usr/bin/
  43. to /usr/local/share/perl/!
  44. to /usr/local/share/perl/!
  45. we shall laugh/cry/run around naked
  46. we shall laugh/cry/run around naked
  47. da *foo*
  48. da <b>foo</b>
  49. da *foo bar 6*
  50. da <b>foo bar 6</b>
  51. da a*b is not * whatever
  52. da a*b is not * whatever
  53. da a*b is not* whatever
  54. da a*b is not* whatever
  55. da a *b is not * whatever
  56. da a *b is not * whatever
  57. da a *b is not* whatever
  58. da a <b>b is not</b> whatever
  59. _foo_
  60. <em style="text-decoration: underline; font-style: normal;">foo</em>
  61. foo_bar_baz
  62. foo_bar_baz
  63. _foo bar 4_
  64. <em style="text-decoration: underline; font-style: normal;">foo bar 4</em>
  65. this -> that
  66. this &#x2192;&#x00a0;that
  67. and this...
  68. and this&#x2026;
  69. foo---bar
  70. foo&#x2014;bar
  71. foo -- bar
  72. foo &#x2013; bar
  73. foo\n----\nbar
  74. foo <hr /><p>bar</p>
  75. foo ##bar+## baz
  76. foo <code>bar+</code> baz
  77. foo %%bar+%% baz
  78. foo <span>bar+</span> baz
  79. ##http://www.example.com##
  80. <code>http://www.example.com</code>
  81. %%http://www.example.com%%
  82. <span>http://www.example.com</span>
  83. and **this\nis!** me
  84. and <b>this\nis!</b> me
  85. and //this\nis!// me
  86. and <i>this\nis!</i> me
  87. and __this\nis!__ me
  88. and <em style="text-decoration: underline; font-style: normal;">this\nis!</em> me
  89. and ~~this\nis!~~ me
  90. and <em>this\nis!</em> me
  91. um\n{{{\ncode\n}}} here
  92. um <pre>code\n</pre><p>here</p>
  93. um\n{{{\ncode\n}}}\n here
  94. um <pre>code\n</pre><pre> here</pre>
  95. um\n{{{\ncode\n}}} \n here
  96. um <pre>code\n</pre><pre> here</pre>
  97. um\n{{{\ncode\n\nmore code\n}}} here
  98. um <pre>code\n\nmore code\n</pre><p>here</p>
  99. um {{{code}}} here
  100. um {{{code}}} here
  101. or //this// and\n//that//
  102. or <i>this</i> and <i>that</i>
  103. __ and 7000 chars xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  105. ______
  106. ______
  107. ____ and __
  108. ____ and __
  109. //// and //
  110. //// and //
  111. i think //the paragraph should be the limit\n\nright?//
  112. i think //the paragraph should be the limit<p>right?//</p>
  113. 'hi'
  114. &#x2018;hi&#x2019;
  115. say 'hi' to mom
  116. say &#x2018;hi&#x2019; to mom
  117. say 'hi!' to mom
  118. say &#x2018;hi!&#x2019; to mom
  119. i'm tired
  120. i&#x2019;m tired
  121. "hi"
  122. &#x201c;hi&#x201d;
  123. say "hi" to mom
  124. say &#x201c;hi&#x201d; to mom
  125. say "hi!" to mom
  126. say &#x201c;hi!&#x201d; to mom
  127. i"m tired
  128. i"m tired
  129. He said, "[w]hen I voice complaints..."
  130. He said, &#x201c;[w]hen I voice complaints&#x2026;&#x201d;
  131. [foo]'s problem
  132. [foo]&#x2019;s problem
  133. EOT
  134. $MarkupQuotes = 0;
  135. run_tests(q{"Get lost!", they say, and I answer: "I'm not 'lost'!"},
  136. q{"Get lost!", they say, and I answer: "I'm not 'lost'!"});
  137. $MarkupQuotes = 1;
  138. run_tests(q{"Get lost!", they say, and I answer: "I'm not 'lost'!"},
  139. q{&#x201c;Get lost!&#x201d;, they say, and I answer: &#x201c;I&#x2019;m not &#x2018;lost&#x2019;!&#x201d;});
  140. $MarkupQuotes = 2;
  141. run_tests(q{"Get lost!", they say, and I answer: "I'm not 'lost'!"},
  142. q{&#x00ab;Get lost!&#x00bb;, they say, and I answer: &#x00ab;I&#x2019;m not &#x2039;lost&#x203a;!&#x00bb;});
  143. $MarkupQuotes = 3;
  144. run_tests(q{"Get lost!", they say, and I answer: "I'm not 'lost'!"},
  145. q{&#x00bb;Get lost!&#x00ab;, they say, and I answer: &#x00bb;I&#x2019;m not &#x203a;lost&#x2039;!&#x00ab;});
  146. $MarkupQuotes = 4;
  147. run_tests(q{"Get lost!", they say, and I answer: "I'm not 'lost'!"},
  148. q{&#x201e;Get lost!&#x201c;, they say, and I answer: &#x201e;I&#x2019;m not &#x201a;lost&#x2018;!&#x201c;});