setext.t 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright (C) 2006 Alex Schroeder <alex@emacswiki.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 => 12;
  18. do 'modules/setext.pl';
  19. do 'modules/link-all.pl';
  20. run_tests(split('\n',<<'EOT'));
  21. foo
  22. foo
  23. ~foo~
  24. <i>foo</i>
  25. da *foo*
  26. da *foo*
  27. da **foo** bar
  28. da <b>foo</b> bar
  29. da `_**foo**_` bar
  30. da **foo** bar
  31. _foo_
  32. <em style="text-decoration: underline; font-style: normal;">foo</em>
  33. foo_bar_baz
  34. foo_bar_baz
  35. _foo_bar_ baz
  36. <em style="text-decoration: underline; font-style: normal;">foo bar</em> baz
  37. and\nfoo\n===\n\nmore\n
  38. and <h2>foo</h2><p>more</p>
  39. and\n\nfoo\n===\n\nmore\n
  40. and<h2>foo</h2><p>more</p>
  41. and\nfoo \n--- \n\nmore\n
  42. and <h3>foo</h3><p>more</p>
  43. and\nfoo\n---\n\nmore\n
  44. and <h3>foo</h3><p>more</p>
  45. EOT