usemod-options.t 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright (C) 2006, 2007 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 2 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, write to the
  15. # Free Software Foundation, Inc.
  16. # 59 Temple Place, Suite 330
  17. # Boston, MA 02111-1307 USA
  18. require 't/test.pl';
  19. package OddMuse;
  20. use Test::More tests => 7;
  21. add_module('usemod.pl');
  22. InitVariables();
  23. $UseModSpaceRequired = 0;
  24. $UseModMarkupInTitles = 1;
  25. run_tests(split('\n',<<'EOT'));
  26. *one\n**two
  27. <ul><li>one<ul><li>two</li></ul></li></ul>
  28. #one\n##two
  29. <ol><li>one<ol><li>two</li></ol></li></ol>
  30. :one\n:two\n::one and two\n::two and three\n:three
  31. <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>
  32. ;one:eins\n;two:zwei
  33. <dl><dt>one</dt><dd>eins</dd><dt>two</dt><dd>zwei</dd></dl>
  34. =='''title'''==
  35. <h2><strong>title</strong></h2>
  36. 1 \+ 1 = 2
  37. 1 \+ 1 = 2
  38. EOT
  39. xpath_run_tests(split('\n',<<'EOT'));
  40. ==[[Free Link]]==
  41. //h2/text()[string()="[[Free_Link"]/following-sibling::a[@class="edit"][@title="Click to edit this page"][@href="http://localhost/test.pl?action=edit;id=Free_Link"][text()="?"]/following-sibling::text()[string()="]]"]
  42. EOT