hey-red / Markdown

Open source C# implementation of Markdown processor, as featured on Stack Overflow.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Additional unit tests

GoogleCodeExporter opened this issue · comments

I ran code coverage over your default test suite, and found a few holes in 
corner cases.  I have patches for some of those:

1. Not testing the empty-string case (Transform with null/empty)
2. Handling reference links with bold/italic titles wasn't tested
3. Handling images with empty link ids wasn't tested
4. Handling images with invalid link ids wasn't tested
5. Some normalization/special character cases weren't completely tested (sub 
character, carriage return at end of file)

I also saw the options/config file stuff and options constructor aren't covered 
at all by default.  Maybe this is by design?  I didn't try out the tests you 
have.

And a minor code issue found by examining coverage:

1. LinkEvaluator checks for null in the matches returned - is this necessary?  
I'm getting partial coverage on it because of that.  I don't think other match 
evaluators check for null.  Or if it is necessary, maybe other ones should too?

Original issue reported on code.google.com by kav...@gmail.com on 7 Nov 2011 at 10:37

Attachments: