# Copyright (C) 2014 Alex Schroeder # # 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 . require 't/test.pl'; package OddMuse; use Test::More tests => 20; add_module('simple-rules.pl'); update_page('foo', 'test'); update_page('bar', 'test'); update_page('baz', 'test'); run_tests(split('\n',<<'EOT')); test

test

foo\n\nbar

foo

bar

test\n====\n

test

test\n----\n

test

foo\nbar\n\ntest\n----\n\nfoo\nbar\n

foo\nbar

test

foo\nbar

* foo\n* bar\n* baz\n 1. foo\n2. bar\n3. baz\n
  1. foo
  2. bar
  3. baz
~test~ foo

test foo

**test foo**

test foo

//test foo//

test foo

__test foo__

test foo

*test* foo

test foo

/test/ foo

test foo

_test_ foo

test foo

http://www.oddmuse.org/

http://www.oddmuse.org/

/test/ _test_ *test*

test test test

EOT xpath_run_tests(split('\n',<<'EOT')); [[foo]] //a[@class="local"][@href="http://localhost/test.pl/foo"][text()="foo"] this is [[foo]]. //p/a[@class="local"][@href="http://localhost/test.pl/foo"][text()="foo"] [[foo]] and [[bar]] //a[text()="foo"]/following::a[text()="bar"] * some [[foo]]\n* [[bar]] and [[baz]]\n //ul/li[a[text()="foo"]]/following::li[a[text()="bar"]/following::a[text()="baz"]] EOT