[wiki-standards] Better Creole Tests?
Alex
kensanata at gmail.com
Sat Jul 26 00:24:11 CEST 2008
Well, I personally don't believe in test pages that humans actually have to
look at. Attached you'll find my Creole unit tests written in Perl (for the
Creole extension to Oddmuse). The first part (the run_tests) call is
contains alternating input and expected output lines. To take the first two
lines:
# one
<ol><li>one</li></ol>
Then you have two blocks where I test alternatives using the tilde and
linebreaks, and finally a larger block using XPath to run the test. Again,
using the first example:
[[http://www.wikicreole.org/]]
//a[@class="url http outside"][@href="http://www.wikicreole.org/"][text()="
http://www.wikicreole.org/"]
Clearly, you would either replace the @class test with something of your own
devising, or strip it entirely. I had to use XPath because in this
particular case <a href="foo" class="bar">url</a> and <a class="bar"
href="foo">url</a> are equivalents (and the exact output depends on the Perl
library version I'm using.
I wouldn't mind collecting an edited subset of these tests on the Creole
wiki. I'd also be interested in other tests that I've missed.
Cheers
Alex
On Fri, Jul 25, 2008 at 11:10 PM, Michael B Allen <ioplex at gmail.com> wrote:
> Hi,
>
> I want to test my Creole implementation but I can't find any really
> good examples that stress all of the corner cases.
>
> Does anyone know of a good example page somewhere?
>
> Mike
>
> --
> Michael B Allen
> PHP Active Directory SPNEGO SSO
> http://www.ioplex.com/
> _______________________________________________
>
> wiki-standards mailing list. wiki-standards at wikisym.org
> http://www.wikisym.org/cgi-bin/mailman/listinfo/wiki-standards
>
> For the wiki-research, wiki-standards, wikisym-announce mailing lists,
> please see:
> http://www.wikisym.org/cgi-bin/mailman/listinfo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.wikisym.org/pipermail/wiki-standards/attachments/20080726/d143635f/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: creole.t
Type: application/x-troff
Size: 9432 bytes
Desc: not available
Url : http://www.wikisym.org/pipermail/wiki-standards/attachments/20080726/d143635f/creole.t
More information about the wiki-standards
mailing list