Text::Markdown vs MDTest (Was: Re: forking Markdown.pl?)

Michel Fortin michel.fortin at michelf.com
Sat Mar 22 14:04:06 EDT 2008


Le 2008-03-22 à 8:49, Tomas Doran a écrit :


> The problem with that is that it's pretty hard to require that

> everyone installing (the perl version of) Markdown has php5

> installed...

>

> Obviously, I can make this optional (and you can only run these

> tests if you have php5), however that would make the CPAN smoke

> testing I get a whole helluva lot less effective..

>

> The other issue is that as mdtest.php doesn't output TAP test

> format, then it's not possible to use it in standard perl TAP tests

> - however this is easily overcome by providing a wrapper.

>

> So, my approximate plan is:

> 1) Re-write your whitespace normalisation stuff (or see if I can

> convince something on CPAN already to do it), for my test suite so

> that getting a real smoke test against MDTest doesn't require php.


For that I'm basically using the HTML and/or XML parser from PHP 5
(which is libxml I think), iterating over each DOM node and reworking
whitespace depending on the context. Porting that shouldn't be very
hard if you have access to an XML parser.


> 2) Write a wrapper for mdtest.php to convert it's output into TAP

> format so that it can/will be run as part of my test suite if php5

> is available. (Or, I can write php - would you take a patch to

> output TAP format as an option so that I don't have to re-parse your

> output?)


I'd gladly accept a patch.

...but I'm not sure I get what your plan is: do you intend to do both
1 *and* 2?


> 3) Compare all of my tests to see which I'd like to add to MDTest.


Or perhaps I could just add all of your tests as a separate testsuite.


> 4) Fix the bugs left in Text::Markdown which the PHP Markdown test

> suite shows up ;)



Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Markdown-Discuss mailing list