Re: A kind of markdown test suite

Le 21 nov. 2012 à 16:57, Dave Pawson a écrit :
> Is the MD syntax?

This is the syntax as defined in 
http://daringfireball.net/projects/markdown/syntax

> Have you made any assumptions about scope?

No assumptions about scope.

> whats the purpose please?

To have individual md file for each type of constructs.
And to learn what is missing in the current spec.
There are many things undefined when you dig a bit.
Having a strawmann document with the specification rewritten and all issues box for everything which is undefined would be a nice start.

> To find edge cases?

Reading the spec, I have seen things which are likely to be undefined. The languages defined some transformations to HTML but not what it should be in case of some errors. 

A very simple example with

 > Link definition names may consist 
 > of letters, numbers, spaces, and 
 > punctuation — but they are 
 > NOT case sensitive.

So let's say:

[Foo][web] and [bar][WEB]

[web]: http://foo.example.org/
[WEB]: http://bar.example.com/

What should happen is undefined by the Markdown spec.
Should all links be the first idref
or the last idref?
should the processor issue a warning?
etc.

> To check coverage?

Ultimately with a driver it could be used for it, but that requires the output reftest.


> will you go on to generated expected XHTML output for automatic comparison

I could create the suggested html fragment output suggested by John Gruber. If someone wants to do it. Be my guest, pull requests are welcome. As I said on twitter. 

 ♥→pull requests. 
 Hate→/dev/null 

I would suggest to just create a minimal text file with the same name than the input markdown containing the html markup and maybe filename extension .out

For example https://raw.github.com/karlcow/markdown-testsuite/master/tests/blockquote-line.md

-----------------------------------
 >Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
-----------------------------------

should probably be a file 
blockquote-line.out

-----------------------------------
<blockquote><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p></blockquote>
-----------------------------------

Or maybe a DOM view.


> or use manual comparison for a result?


Not sure what you mean here. 


-- 
Karl Dubost - http://dev.opera.com/
Developer Relations, Opera Software

Received on Wednesday, 21 November 2012 08:54:52 UTC