wiki.pl: Port some fixes from upstream
[Orgmuse.git] / t / moin.t
blob8b67afec070f514725bf45ab66b2bd3562f9a1af
1 # Copyright (C) 2006  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
19 require 't/test.pl';
20 package OddMuse;
21 use Test::More tests => 15;
22 clear_pages();
24 add_module('moin.pl');
26 xpath_run_tests(split('\n',<<'EOT'));
27 foo[[BR]]bar
28 //text()[string()="foo"]/following-sibling::br/following-sibling::text()[string()="bar"]
29 ''foo''
30 //em[text()="foo"]
31 '''bar'''
32 //strong[text()="bar"]
33 [[foo bar]]
34 //a[@class="edit"][@title="Click to edit this page"][@href="http://localhost/test.pl?action=edit;id=foo_bar"][text()="?"]
35 ["foo bar"]
36 //a[@class="edit"][@title="Click to edit this page"][@href="http://localhost/test.pl?action=edit;id=foo_bar"][text()="?"]
37  * one\n * two\n  * two.one
38 //ul/li[text()="one"]/following-sibling::li/text()[string()="two"]/following-sibling::ul/li[text()="two.one"]
39   * one\n    * one.one\n  * two
40 //ul/li/text()[string()="one"]/following-sibling::ul/li[text()="one.one"]/../../following-sibling::li[text()="two"]
41   * one\n    * one.one\n * two
42 //ul/li/text()[string()="one"]/following-sibling::ul/li[text()="one.one"]/../../following-sibling::li[text()="two"]
43  1. one\n 1. two\n  1. two.one
44 //ol/li[text()="one"]/following-sibling::li/text()[string()="two"]/following-sibling::ol/li[text()="two.one"]
45    one\n     one.one\n  two
46 //dl[@class="quote"]/dd/text()[normalize-space(string())="one"]/following-sibling::dl/dd[normalize-space(text())="one.one"]/../../following-sibling::dd[text()="two"]
47  * one\n more\n * two\n more
48 //ul/li[normalize-space(text())="one more"]/following-sibling::li[normalize-space(text())="two more"]
49  * one\n more\n  * two\n  more
50 //ul/li/text()[normalize-space(string())="one more"]/following-sibling::ul/li[normalize-space(text())="two more"]
51   one\n  more\n    two\n    more
52 //dl[@class="quote"]/dd/text()[normalize-space(string())="one more"]/following-sibling::dl/dd[normalize-space(text())="two more"]
53 {{{\n[[foo bar]]\n}}}
54 //pre[@class="real"][text()="[[foo bar]]\n"]
55 hello mum\nthis is for you...
56 //div[text()="hello mum this is for you..."]
57 EOT