I'd like to post my unit tests somewhere, for easy reference. But I fear this doesn't work too well on this wiki, since the block quote elements are also part of the unit tests. This wiki needs a link to formatting rules from the edit page! :)
The following is a list alternating input and expected output lines.
# one <ol><li>one</li></ol> # one\n# two <ol><li>one</li><li>two</li></ol> # one\n\n# two <ol><li>one</li><li>two</li></ol> - one <ul><li>one</li></ul> # one\n- two <ol><li>one</li></ol><ul><li>two</li></ul> **bold** <strong>bold</strong> //italic// <em>italic</em> **//bold italic**//italic <strong><em>bold italic</em></strong><em>italic</em> //**bold italic//**bold <em><strong>bold italic</strong></em><strong>bold</strong> = foo = foo == foo <h2>foo</h2> === foo <h3>foo</h3> ==== foo <h4>foo</h4> ===== foo ===== foo == foo == <h2>foo </h2> == foo\nbar <h2>foo</h2><p>bar</p> foo\n\nbar foo<p>bar</p> foo\nbar foo<br />bar {{{\nfoo\n}}} <pre class="real">foo\n</pre> {{{\nfoo}}} <span class="nowiki">\nfoo</span> foo {{{bar}}} foo <span class="nowiki">bar</span> ---- <hr /> ----- <hr /> ~~~~ <hr /> ____ <hr />
Some XPATH tests that test class attributes as well. The exact results are useless to other developers. The cases that Oddmuse is known to handle well, however, is of interest.
[[http://www.wikicreole.org/|Visit the WikiCreole website]] //a[@class="url http outside"][@href="http://www.wikicreole.org/"][text()="Visit the WikiCreole website"] [[http://www.wikicreole.org/|Visit the\nWikiCreole website]] //a[@class="url http outside"][@href="http://www.wikicreole.org/"][text()="Visit the\nWikiCreole website"] [[link]] //a[text()="link"] [[link|Go to my page]] //a[@class="local"][@href="http://localhost/test.pl/link"][text()="Go to my page"] [[link|Go to\nmy page]] //a[@class="local"][@href="http://localhost/test.pl/link"][text()="Go to\nmy page"] {{Image:pic}} //a[@class="image"][@href="http://localhost/test.pl/pic"][img[@class="upload"][@src="http://localhost/test.pl/download/pic"][@alt="pic"]] [[link|{{Image:pic}}]] //a[@class="image"][@href="http://localhost/test.pl/link"][img[@class="upload"][@src="http://localhost/test.pl/download/pic"][@alt="link"]] [[http://example.com/|{{Image:pic}}]] //a[@class="image outside"][@href="http://example.com/"][img[@class="upload"][@src="http://localhost/test.pl/download/pic"][@alt="pic"]] {{Image:http://example.com/}} //a[@class="image outside"][@href="http://example.com/"][img[@class="url outside"][@src="http://example.com/"]] [[http://example.com/|{{Image:http://mu.org/}}]] //a[@class="image outside"][@href="http://example.com/"][img[@class="url outside"][@src="http://mu.org/"]]
Add new attachment
Only authorized users are allowed to upload new attachments.
«
This particular version was published on 04-Sep-2006 03:44 by 217.162.145.188.