michelf/mdtest — pull request #4 by ciarand (2013-09-13 04:42:46+00:00)
Title: Add test cases for backtick fenced code blocks

This PR adds new test cases for the proposed backtick bordered fenced code blocks (a la [Github Flavored Markdown][gfm]). See michelf/php-markdown#84 and michelf/php-markdown#128.

[gfm]: http://github.github.com/github-flavored-markdown/

These test cases are identical to the tilde fenced code blocks. This also prefixes the original fenced code block test cases with a "Tilde ", whereas the backtick bordered fenced code block test cases are prefixed, unsurprisingly, with "Backtick ".

Here were the original results of the test suite, ran against the "lib" branch version 1.3:
```
./mdtest.php -l "wrapper.php" -f MarkdownExtra -t "Markdown" -t "PHP Markdown" -t "PHP Markdown Extra" -n

== Test Suite: Markdown ==

Amps and angle encoding ... OK 26 ms
Auto links ... OK 7 ms
Backslash escapes ... OK 20 ms
Blockquotes with code blocks ... OK 2 ms
Code Blocks ... OK 2 ms
Code Spans ... OK 2 ms
Hard-wrapped paragraphs with list-like lines ... OK 2 ms
Horizontal rules ... OK 13 ms
Images ... OK 7 ms
Inline HTML (Advanced) ... OK 6 ms
Inline HTML (Simple) ... OK 15 ms
Inline HTML comments ... OK 3 ms
Links, inline style ... OK 13 ms
Links, reference style ... OK 15 ms
Links, shortcut references ... OK 3 ms
Literal quotes in titles ... OK 1 ms
Markdown Documentation - Basics ... OK 73 ms
Markdown Documentation - Syntax ... OK 241 ms
Nested blockquotes ... OK 2 ms
Ordered and unordered lists ... OK 34 ms
Strong and em together ... OK 3 ms
Tabs ... OK 6 ms
Tidyness ... OK 2 ms

== Test Suite: PHP Markdown ==

Adjacent Lists ... OK 3 ms
Auto Links ... OK 1 ms
Backslash escapes ... OK 2 ms
Code Spans ... OK 1 ms
Code block in a list item ... OK 3 ms
Code block on second line ... OK 0 ms
Code block regressions ... OK 3 ms
Email auto links ... OK 6 ms
Emphasis ... FAILED 52 ms
Empty List Item ... OK 7 ms
Headers ... OK 7 ms
Horizontal Rules ... OK 3 ms
Inline HTML (Simple) ... OK 4 ms
Inline HTML (Span) ... OK 1 ms
Inline HTML comments ... OK 2 ms
Ins & del ... OK 6 ms
Links, inline style ... OK 2 ms
MD5 Hashes ... OK 4 ms
Mixed OLs and ULs ... OK 4 ms
Nesting ... OK 5 ms
PHP-Specific Bugs ... OK 6 ms
Parens in URL ... OK 7 ms
Quotes in attributes ... OK 3 ms
Tight blocks ... OK 3 ms
XML empty tag ... OK 1 ms

== Test Suite: PHP Markdown Extra ==

Abbr ... OK 7 ms
Definition Lists ... OK 31 ms
Emphasis ... OK 57 ms
Fenced Code Blocks Special Cases ... OK 8 ms
Fenced Code Blocks ... OK 15 ms
Footnotes ... FAILED 26 ms
Headers with attributes ... OK 7 ms
Inline HTML with Markdown content ... OK 34 ms
Link & Image Attributes ... OK 4 ms
Tables ... OK 31 ms

56 passed; 2 failed.

Total Avg. Min. Q1. Med. Q3. Max.
Parse Time (ms): 883 15 0 2 6 14 241
Diff. Min. (ms): 825 14 0 1 5 13 240
```

Here are the new results run against the PR #128.
```
./mdtest.php -l "wrapper.php" -f MarkdownExtra -t "Markdown" -t "PHP Markdown" -t "PHP Markdown Extra" -n

== Test Suite: Markdown ==

Amps and angle encoding ... OK 26 ms
Auto links ... OK 13 ms
Backslash escapes ... OK 17 ms
Blockquotes with code blocks ... OK 2 ms
Code Blocks ... OK 2 ms
Code Spans ... OK 3 ms
Hard-wrapped paragraphs with list-like lines ... OK 3 ms
Horizontal rules ... OK 10 ms
Images ... OK 8 ms
Inline HTML (Advanced) ... OK 6 ms
Inline HTML (Simple) ... OK 15 ms
Inline HTML comments ... OK 3 ms
Links, inline style ... OK 13 ms
Links, reference style ... OK 14 ms
Links, shortcut references ... OK 4 ms
Literal quotes in titles ... OK 2 ms
Markdown Documentation - Basics ... OK 60 ms
Markdown Documentation - Syntax ... OK 216 ms
Nested blockquotes ... OK 2 ms
Ordered and unordered lists ... OK 35 ms
Strong and em together ... OK 2 ms
Tabs ... OK 4 ms
Tidyness ... OK 2 ms

== Test Suite: PHP Markdown ==

Adjacent Lists ... OK 4 ms
Auto Links ... OK 1 ms
Backslash escapes ... OK 1 ms
Code Spans ... OK 2 ms
Code block in a list item ... OK 4 ms
Code block on second line ... OK 0 ms
Code block regressions ... OK 1 ms
Email auto links ... OK 8 ms
Emphasis ... FAILED 45 ms
Empty List Item ... OK 9 ms
Headers ... OK 5 ms
Horizontal Rules ... OK 4 ms
Inline HTML (Simple) ... OK 3 ms
Inline HTML (Span) ... OK 2 ms
Inline HTML comments ... OK 2 ms
Ins & del ... OK 6 ms
Links, inline style ... OK 2 ms
MD5 Hashes ... OK 2 ms
Mixed OLs and ULs ... OK 3 ms
Nesting ... OK 4 ms
PHP-Specific Bugs ... OK 4 ms
Parens in URL ... OK 6 ms
Quotes in attributes ... OK 2 ms
Tight blocks ... OK 3 ms
XML empty tag ... OK 0 ms

== Test Suite: PHP Markdown Extra ==

Abbr ... OK 16 ms
Backtick Fenced Code Blocks Special Cases ... OK 9 ms
Backtick Fenced Code Blocks ... OK 17 ms
Definition Lists ... OK 32 ms
Emphasis ... OK 46 ms
Footnotes ... FAILED 18 ms
Headers with attributes ... OK 9 ms
Inline HTML with Markdown content ... OK 32 ms
Link & Image Attributes ... OK 2 ms
Tables ... OK 32 ms
Tilde Fenced Code Blocks Special Cases ... OK 7 ms
Tilde Fenced Code Blocks ... OK 15 ms

58 passed; 2 failed.

Total Avg. Min. Q1. Med. Q3. Max.
Parse Time (ms): 855 14 0 2 4 15 216
Diff. Min. (ms): 813 13 0 2 4 14 215
```