summaryrefslogtreecommitdiff
path: root/macros/generic/markdown/tests/testfiles/PHP_Markdown
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/generic/markdown/tests/testfiles/PHP_Markdown
Initial commit
Diffstat (limited to 'macros/generic/markdown/tests/testfiles/PHP_Markdown')
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/README.md2
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/auto-links.test16
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/backslash-escapes.test19
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/code-block-in-a-list-item.test31
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/code-block-on-second-line.test6
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/email-auto-links.test16
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/emphasis.test272
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/empty-list-item.test97
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/headers.test18
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/horizontal-rules.test51
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/links-inline-style.test9
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/md5-hashes.test22
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/mixed-ols-and-uls.test47
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/nesting.test30
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/parens-in-url.test52
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/php-specific-bugs.test39
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/quotes-in-attributes.test29
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/tables.test327
-rw-r--r--macros/generic/markdown/tests/testfiles/PHP_Markdown/tight-blocks.test30
19 files changed, 1113 insertions, 0 deletions
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/README.md b/macros/generic/markdown/tests/testfiles/PHP_Markdown/README.md
new file mode 100644
index 0000000000..8ceeb21dec
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/README.md
@@ -0,0 +1,2 @@
+This directory contains test files that were inherited from the
+`tests/PHP_Markdown` directory in the lunamark project.
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/auto-links.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/auto-links.test
new file mode 100644
index 0000000000..ba3ee16d9a
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/auto-links.test
@@ -0,0 +1,16 @@
+<<<
+<HTTP://WWW.SOMEURL.COM>
+
+<hr@company.com>
+>>>
+BEGIN link
+- label: HTTP://WWW.SOMEURL.COM
+- URI: HTTP://WWW.SOMEURL.COM
+- title:
+END link
+interblockSeparator
+BEGIN link
+- label: hr@company.com
+- URI: mailto:hr@company.com
+- title:
+END link
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/backslash-escapes.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/backslash-escapes.test
new file mode 100644
index 0000000000..a66cdefb8e
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/backslash-escapes.test
@@ -0,0 +1,19 @@
+<<<
+Tricky combinaisons:
+
+backslash with \\-- two dashes
+
+backslash with \\> greater than
+
+\\[test](not a link)
+
+\\\*no emphasis*
+>>>
+interblockSeparator
+backslash
+interblockSeparator
+backslash
+interblockSeparator
+backslash
+interblockSeparator
+backslash
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/code-block-in-a-list-item.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/code-block-in-a-list-item.test
new file mode 100644
index 0000000000..8ac52d287a
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/code-block-in-a-list-item.test
@@ -0,0 +1,31 @@
+<<<
+
+* List Item:
+
+ code block
+
+ with a blank line
+
+ within a list item.
+
+* code block
+ as first element of a list item
+
+* List Item:
+
+ code block with whitespace on preceding line
+>>>
+ulBegin
+ulItem
+interblockSeparator
+inputVerbatim: ./_markdown_test/3918bc9009f196cbcc980181827419e9.verbatim
+interblockSeparator
+ulItemEnd
+ulItem
+inputVerbatim: ./_markdown_test/2ecbe437956c71ad33b2efd354f11893.verbatim
+ulItemEnd
+ulItem
+interblockSeparator
+inputVerbatim: ./_markdown_test/89ad99c3052a342e765443409ef64797.verbatim
+ulItemEnd
+ulEnd
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/code-block-on-second-line.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/code-block-on-second-line.test
new file mode 100644
index 0000000000..7b402e3fa0
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/code-block-on-second-line.test
@@ -0,0 +1,6 @@
+<<<
+
+ Codeblock on second line
+
+>>>
+inputVerbatim: ./_markdown_test/722b6c7a40293698cf78b28fdb8623ff.verbatim
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/email-auto-links.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/email-auto-links.test
new file mode 100644
index 0000000000..afda759ec7
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/email-auto-links.test
@@ -0,0 +1,16 @@
+<<<
+<michel.fortin@michelf.com>
+
+International domain names: <help@tūdaliņ.lv>
+>>>
+BEGIN link
+- label: michel.fortin@michelf.com
+- URI: mailto:michel.fortin@michelf.com
+- title:
+END link
+interblockSeparator
+BEGIN link
+- label: help@tūdaliņ.lv
+- URI: mailto:help@tūdaliņ.lv
+- title:
+END link
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/emphasis.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/emphasis.test
new file mode 100644
index 0000000000..ed36492e09
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/emphasis.test
@@ -0,0 +1,272 @@
+<<<
+Combined emphasis:
+
+1. ***test test***
+2. ___test test___
+3. *test **test***
+4. **test *test***
+5. ***test* test**
+6. ***test** test*
+7. ***test* test**
+8. **test *test***
+9. *test **test***
+10. _test __test___
+11. __test _test___
+12. ___test_ test__
+13. ___test__ test_
+14. ___test_ test__
+15. __test _test___
+16. _test __test___
+
+
+Incorrect nesting:
+
+1. *test **test* test**
+2. _test __test_ test__
+3. **test *test** test*
+4. __test _test__ test_
+5. *test *test* test*
+6. _test _test_ test_
+7. **test **test** test**
+8. __test __test__ test__
+
+
+
+No emphasis:
+
+1. test* test *test
+2. test** test **test
+3. test_ test _test
+4. test__ test __test
+
+
+
+Middle-word emphasis (asterisks):
+
+1. *a*b
+2. a*b*
+3. a*b*c
+4. **a**b
+5. a**b**
+6. a**b**c
+
+
+Middle-word emphasis (underscore):
+
+1. _a_b
+2. a_b_
+3. a_b_c
+4. __a__b
+5. a__b__
+6. a__b__c
+
+my_precious_file.txt
+
+
+## Tricky Cases
+
+E**. **Test** TestTestTest
+
+E**. **Test** Test Test Test
+
+
+## Overlong emphasis
+
+Name: ____________
+Organization: ____
+Region/Country: __
+
+_____Cut here_____
+
+____Cut here____
+
+>>>
+interblockSeparator
+olBeginTight
+olItemWithNumber: 1
+strongEmphasis: (emphasis: test test)
+olItemEnd
+olItemWithNumber: 2
+strongEmphasis: (emphasis: test test)
+olItemEnd
+olItemWithNumber: 3
+emphasis: test (strongEmphasis: test)
+olItemEnd
+olItemWithNumber: 4
+strongEmphasis: test (emphasis: test)
+olItemEnd
+olItemWithNumber: 5
+strongEmphasis: (emphasis: test) test
+olItemEnd
+olItemWithNumber: 6
+emphasis: (strongEmphasis: test) test
+olItemEnd
+olItemWithNumber: 7
+strongEmphasis: (emphasis: test) test
+olItemEnd
+olItemWithNumber: 8
+strongEmphasis: test (emphasis: test)
+olItemEnd
+olItemWithNumber: 9
+emphasis: test (strongEmphasis: test)
+olItemEnd
+olItemWithNumber: 10
+emphasis: test (strongEmphasis: test)
+olItemEnd
+olItemWithNumber: 11
+strongEmphasis: test (emphasis: test)
+olItemEnd
+olItemWithNumber: 12
+strongEmphasis: (emphasis: test) test
+olItemEnd
+olItemWithNumber: 13
+emphasis: (strongEmphasis: test) test
+olItemEnd
+olItemWithNumber: 14
+strongEmphasis: (emphasis: test) test
+olItemEnd
+olItemWithNumber: 15
+strongEmphasis: test (emphasis: test)
+olItemEnd
+olItemWithNumber: 16
+emphasis: test (strongEmphasis: test)
+olItemEnd
+olEndTight
+interblockSeparator
+interblockSeparator
+olBeginTight
+olItemWithNumber: 1
+strongEmphasis: test* test
+olItemEnd
+olItemWithNumber: 2
+underscore
+strongEmphasis: test(underscore) test
+olItemEnd
+olItemWithNumber: 3
+emphasis: (emphasis: test (emphasis: test)) test
+olItemEnd
+olItemWithNumber: 4
+emphasis: (emphasis: test (emphasis: test)) test
+olItemEnd
+olItemWithNumber: 5
+emphasis: test (emphasis: test) test
+olItemEnd
+olItemWithNumber: 6
+emphasis: test (emphasis: test) test
+olItemEnd
+olItemWithNumber: 7
+strongEmphasis: test (strongEmphasis: test) test
+olItemEnd
+olItemWithNumber: 8
+strongEmphasis: test (strongEmphasis: test) test
+olItemEnd
+olEndTight
+interblockSeparator
+interblockSeparator
+olBeginTight
+olItemWithNumber: 1
+olItemEnd
+olItemWithNumber: 2
+emphasis: * test *
+olItemEnd
+olItemWithNumber: 3
+underscore
+underscore
+olItemEnd
+olItemWithNumber: 4
+emphasis: (underscore) test (underscore)
+olItemEnd
+olEndTight
+interblockSeparator
+interblockSeparator
+olBeginTight
+olItemWithNumber: 1
+emphasis: a
+olItemEnd
+olItemWithNumber: 2
+emphasis: b
+olItemEnd
+olItemWithNumber: 3
+emphasis: b
+olItemEnd
+olItemWithNumber: 4
+strongEmphasis: a
+olItemEnd
+olItemWithNumber: 5
+strongEmphasis: b
+olItemEnd
+olItemWithNumber: 6
+strongEmphasis: b
+olItemEnd
+olEndTight
+interblockSeparator
+interblockSeparator
+olBeginTight
+olItemWithNumber: 1
+emphasis: a
+olItemEnd
+olItemWithNumber: 2
+emphasis: b
+olItemEnd
+olItemWithNumber: 3
+emphasis: b
+olItemEnd
+olItemWithNumber: 4
+strongEmphasis: a
+olItemEnd
+olItemWithNumber: 5
+strongEmphasis: b
+olItemEnd
+olItemWithNumber: 6
+strongEmphasis: b
+olItemEnd
+olEndTight
+interblockSeparator
+emphasis: precious
+interblockSeparator
+headingTwo: Tricky Cases
+interblockSeparator
+strongEmphasis: Test
+interblockSeparator
+strongEmphasis: Test
+interblockSeparator
+headingTwo: Overlong emphasis
+interblockSeparator
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+interblockSeparator
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+interblockSeparator
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
+underscore
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/empty-list-item.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/empty-list-item.test
new file mode 100644
index 0000000000..a9fb47b84b
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/empty-list-item.test
@@ -0,0 +1,97 @@
+<<<
+With asterisks
+
+ * List item
+ *
+ * List item
+
+With numbers
+
+1. List item
+2.
+3. List item
+
+With hyphens
+
+- List item
+-
+- List item
+
+With asterisks
+
+ * List item
+ * List item
+ *
+
+With numbers
+
+1. List item
+2. List item
+3.
+
+With hyphens
+
+- List item
+- List item
+-
+
+>>>
+interblockSeparator
+ulBeginTight
+ulItem
+ulItemEnd
+ulItem
+ulItemEnd
+ulItem
+ulItemEnd
+ulEndTight
+interblockSeparator
+interblockSeparator
+olBeginTight
+olItemWithNumber: 1
+olItemEnd
+olItemWithNumber: 2
+olItemEnd
+olItemWithNumber: 3
+olItemEnd
+olEndTight
+interblockSeparator
+interblockSeparator
+ulBeginTight
+ulItem
+ulItemEnd
+ulItem
+ulItemEnd
+ulItem
+ulItemEnd
+ulEndTight
+interblockSeparator
+interblockSeparator
+ulBeginTight
+ulItem
+ulItemEnd
+ulItem
+ulItemEnd
+ulItem
+ulItemEnd
+ulEndTight
+interblockSeparator
+interblockSeparator
+olBeginTight
+olItemWithNumber: 1
+olItemEnd
+olItemWithNumber: 2
+olItemEnd
+olItemWithNumber: 3
+olItemEnd
+olEndTight
+interblockSeparator
+interblockSeparator
+ulBeginTight
+ulItem
+ulItemEnd
+ulItem
+ulItemEnd
+ulItem
+ulItemEnd
+ulEndTight
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/headers.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/headers.test
new file mode 100644
index 0000000000..f068181502
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/headers.test
@@ -0,0 +1,18 @@
+<<<
+### Header
+
+ - - -
+
+Paragraphr
+
+ - - -
+
+Paragraph
+>>>
+headingThree: Header
+interblockSeparator
+horizontalRule
+interblockSeparator
+interblockSeparator
+horizontalRule
+interblockSeparator
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/horizontal-rules.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/horizontal-rules.test
new file mode 100644
index 0000000000..634ad3db9c
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/horizontal-rules.test
@@ -0,0 +1,51 @@
+<<<
+Horizontal rules:
+
+- - -
+
+* * *
+
+***
+
+---
+
+___
+
+Not horizontal rules (testing for a bug in 1.0.1j):
+
++++
+
+,,,
+
+===
+
+???
+
+AAA
+
+jjj
+
+j j j
+
+n n n
+
+>>>
+interblockSeparator
+horizontalRule
+interblockSeparator
+horizontalRule
+interblockSeparator
+horizontalRule
+interblockSeparator
+horizontalRule
+interblockSeparator
+horizontalRule
+interblockSeparator
+interblockSeparator
+interblockSeparator
+interblockSeparator
+interblockSeparator
+interblockSeparator
+interblockSeparator
+interblockSeparator
+interblockSeparator
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/links-inline-style.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/links-inline-style.test
new file mode 100644
index 0000000000..bb67b838d1
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/links-inline-style.test
@@ -0,0 +1,9 @@
+<<<
+[silly URL w/ angle brackets](<?}]*+|&)>).
+
+>>>
+BEGIN link
+- label: silly URL w/ angle brackets
+- URI: ?(rightBrace)]*+(pipe)(ampersand))
+- title:
+END link
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/md5-hashes.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/md5-hashes.test
new file mode 100644
index 0000000000..b70a29c981
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/md5-hashes.test
@@ -0,0 +1,22 @@
+<<<
+# Character Escapes
+
+The MD5 value for `+` is "26b17225b626fb9238849fd60eabdf60".
+
+# HTML Blocks
+
+<p>test</p>
+
+The MD5 value for `<p>test</p>` is:
+
+6205333b793f34273d75379350b36826
+>>>
+headingOne: Character Escapes
+interblockSeparator
+codeSpan: +
+interblockSeparator
+headingOne: HTML Blocks
+interblockSeparator
+interblockSeparator
+codeSpan: <p>test</p>
+interblockSeparator
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/mixed-ols-and-uls.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/mixed-ols-and-uls.test
new file mode 100644
index 0000000000..fddda61878
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/mixed-ols-and-uls.test
@@ -0,0 +1,47 @@
+<<<
+* test
++ test
+- test
+
+1. test
+2. test
+
+* test
++ test
+- test
+
+1. test
+2. test
+
+>>>
+ulBeginTight
+ulItem
+ulItemEnd
+ulItem
+ulItemEnd
+ulItem
+ulItemEnd
+ulEndTight
+interblockSeparator
+olBeginTight
+olItemWithNumber: 1
+olItemEnd
+olItemWithNumber: 2
+olItemEnd
+olEndTight
+interblockSeparator
+ulBeginTight
+ulItem
+ulItemEnd
+ulItem
+ulItemEnd
+ulItem
+ulItemEnd
+ulEndTight
+interblockSeparator
+olBeginTight
+olItemWithNumber: 1
+olItemEnd
+olItemWithNumber: 2
+olItemEnd
+olEndTight
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/nesting.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/nesting.test
new file mode 100644
index 0000000000..f95ada9662
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/nesting.test
@@ -0,0 +1,30 @@
+<<<
+Valid nesting:
+
+**[Link](url)**
+
+[**Link**](url)
+
+**[**Link**](url)**
+
+Invalid nesting:
+
+[[Link](url)](url)
+>>>
+interblockSeparator
+strongEmphasis: (BEGIN link)(- label: Link)(- URI: url)(- title: )(END link)
+interblockSeparator
+BEGIN link
+- label: (strongEmphasis: Link)
+- URI: url
+- title:
+END link
+interblockSeparator
+strongEmphasis: (BEGIN link)(- label: (strongEmphasis: Link))(- URI: url)(- title: )(END link)
+interblockSeparator
+interblockSeparator
+BEGIN link
+- label: [Link](url)
+- URI: url
+- title:
+END link
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/parens-in-url.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/parens-in-url.test
new file mode 100644
index 0000000000..7c7831220a
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/parens-in-url.test
@@ -0,0 +1,52 @@
+<<<
+[Inline link 1 with parens](/url\(test\) "title").
+
+[Inline link 2 with parens](</url\(test\)> "title").
+
+[Inline link 3 with non-escaped parens](/url(test) "title").
+
+[Inline link 4 with non-escaped parens](</url(test)> "title").
+
+[Reference link 1 with parens][1].
+
+[Reference link 2 with parens][2].
+
+ [1]: /url(test) "title"
+ [2]: </url(test)> "title"
+
+>>>
+BEGIN link
+- label: Inline link 1 with parens
+- URI: /url(test)
+- title: title
+END link
+interblockSeparator
+BEGIN link
+- label: Inline link 2 with parens
+- URI: /url(test)
+- title: title
+END link
+interblockSeparator
+BEGIN link
+- label: Inline link 3 with non-escaped parens
+- URI: /url(test)
+- title: title
+END link
+interblockSeparator
+BEGIN link
+- label: Inline link 4 with non-escaped parens
+- URI: /url(test)
+- title: title
+END link
+interblockSeparator
+BEGIN link
+- label: Reference link 1 with parens
+- URI: /url(test)
+- title: title
+END link
+interblockSeparator
+BEGIN link
+- label: Reference link 2 with parens
+- URI: /url(test)
+- title: title
+END link
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/php-specific-bugs.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/php-specific-bugs.test
new file mode 100644
index 0000000000..3f3db6c6ee
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/php-specific-bugs.test
@@ -0,0 +1,39 @@
+<<<
+This tests for a bug where quotes escaped by PHP when using
+`preg_replace` with the `/e` modifier must be correctly unescaped
+(hence the `_UnslashQuotes` function found only in PHP Markdown).
+
+
+
+Headers below should appear exactly as they are typed (no backslash
+added or removed).
+
+Header "quoted\" again \\""
+===========================
+
+Header "quoted\" again \\""
+---------------------------
+
+### Header "quoted\" again \\"" ###
+
+
+
+Test with tabs for `_Detab`:
+
+ Code 'block' with some "tabs" and "quotes"
+
+>>>
+codeSpan: preg(underscore)replace
+codeSpan: /e
+codeSpan: (underscore)UnslashQuotes
+interblockSeparator
+interblockSeparator
+headingOne: Header "quoted(backslash)" again (backslash)""
+interblockSeparator
+headingTwo: Header "quoted(backslash)" again (backslash)""
+interblockSeparator
+headingThree: Header "quoted(backslash)" again (backslash)""
+interblockSeparator
+codeSpan: (underscore)Detab
+interblockSeparator
+inputVerbatim: ./_markdown_test/58f5a43337a97a77594d067c159d772c.verbatim
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/quotes-in-attributes.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/quotes-in-attributes.test
new file mode 100644
index 0000000000..75247fc7fd
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/quotes-in-attributes.test
@@ -0,0 +1,29 @@
+<<<
+[Test](/"style="color:red)
+[Test](/'style='color:red)
+
+![](/"style="border-color:red;border-size:1px;border-style:solid)
+![](/'style='border-color:red;border-size:1px;border-style:solid)
+
+>>>
+BEGIN link
+- label: Test
+- URI: /"style="color:red
+- title:
+END link
+BEGIN link
+- label: Test
+- URI: /'style='color:red
+- title:
+END link
+interblockSeparator
+BEGIN image
+- label:
+- URI: /"style="border-color:red;border-size:1px;border-style:solid
+- title:
+END image
+BEGIN image
+- label:
+- URI: /'style='border-color:red;border-size:1px;border-style:solid
+- title:
+END image
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/tables.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/tables.test
new file mode 100644
index 0000000000..9300123d19
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/tables.test
@@ -0,0 +1,327 @@
+\def\markdownOptionPipeTables{true}
+<<<
+Header 1 | Header 2
+--------- | ---------
+Cell 1 | Cell 2
+Cell 3 | Cell 4
+
+With leading pipes:
+
+| Header 1 | Header 2
+| --------- | ---------
+| Cell 1 | Cell 2
+| Cell 3 | Cell 4
+
+With tailing pipes:
+
+Header 1 | Header 2 |
+--------- | --------- |
+Cell 1 | Cell 2 |
+Cell 3 | Cell 4 |
+
+With leading and tailing pipes:
+
+| Header 1 | Header 2 |
+| --------- | --------- |
+| Cell 1 | Cell 2 |
+| Cell 3 | Cell 4 |
+
+* * *
+
+# One-column one-row table
+
+With leading pipes:
+
+| Header
+| -------
+| Cell
+
+With tailing pipes:
+
+Header |
+------- |
+Cell |
+
+With leading and tailing pipes:
+
+| Header |
+| ------- |
+| Cell |
+
+* * *
+
+Table alignement:
+
+| Default | Right | Center | Left |
+| --------- |:--------- |:---------:| ---------:|
+| Long Cell | Long Cell | Long Cell | Long Cell |
+| Cell | Cell | Cell | Cell |
+
+Table alignement (alternate spacing):
+
+| Default | Right | Center | Left |
+| --------- | :-------- | :-------: | --------: |
+| Long Cell | Long Cell | Long Cell | Long Cell |
+| Cell | Cell | Cell | Cell |
+
+* * *
+
+# Empty cells
+
+| Header 1 | Header 2 |
+| --------- | --------- |
+| A | B |
+| C | |
+
+Header 1 | Header 2
+--------- | ---------
+A | B
+ | D
+
+* * *
+
+# Missing tailing pipe
+
+Header 1 | Header 2
+--------- | --------- |
+Cell | Cell |
+Cell | Cell |
+
+Header 1 | Header 2 |
+--------- | ---------
+Cell | Cell |
+Cell | Cell |
+
+Header 1 | Header 2 |
+--------- | --------- |
+Cell | Cell
+Cell | Cell |
+
+Header 1 | Header 2 |
+--------- | --------- |
+Cell | Cell |
+Cell | Cell
+
+* * *
+
+# Too many pipes in rows
+
+| Header 1 | Header 2 |
+| ---------
+| Cell | Cell | Extra cell? |
+| Cell | Cell | Extra cell? |
+>>>
+BEGIN table (3 rows, 2 columns)
+- caption:
+- alignment of column 1: d
+- alignment of column 2: d
+- row 1, column 1: Header 1
+- row 1, column 2: Header 2
+- row 2, column 1: Cell 1
+- row 2, column 2: Cell 2
+- row 3, column 1: Cell 3
+- row 3, column 2: Cell 4
+END table
+interblockSeparator
+interblockSeparator
+BEGIN table (3 rows, 2 columns)
+- caption:
+- alignment of column 1: d
+- alignment of column 2: d
+- row 1, column 1: Header 1
+- row 1, column 2: Header 2
+- row 2, column 1: Cell 1
+- row 2, column 2: Cell 2
+- row 3, column 1: Cell 3
+- row 3, column 2: Cell 4
+END table
+interblockSeparator
+interblockSeparator
+BEGIN table (3 rows, 2 columns)
+- caption:
+- alignment of column 1: d
+- alignment of column 2: d
+- row 1, column 1: Header 1
+- row 1, column 2: Header 2
+- row 2, column 1: Cell 1
+- row 2, column 2: Cell 2
+- row 3, column 1: Cell 3
+- row 3, column 2: Cell 4
+END table
+interblockSeparator
+interblockSeparator
+BEGIN table (3 rows, 2 columns)
+- caption:
+- alignment of column 1: d
+- alignment of column 2: d
+- row 1, column 1: Header 1
+- row 1, column 2: Header 2
+- row 2, column 1: Cell 1
+- row 2, column 2: Cell 2
+- row 3, column 1: Cell 3
+- row 3, column 2: Cell 4
+END table
+interblockSeparator
+horizontalRule
+interblockSeparator
+headingOne: One-column one-row table
+interblockSeparator
+interblockSeparator
+BEGIN table (2 rows, 1 columns)
+- caption:
+- alignment of column 1: d
+- row 1, column 1: Header
+- row 2, column 1: Cell
+END table
+interblockSeparator
+interblockSeparator
+BEGIN table (2 rows, 1 columns)
+- caption:
+- alignment of column 1: d
+- row 1, column 1: Header
+- row 2, column 1: Cell
+END table
+interblockSeparator
+interblockSeparator
+BEGIN table (2 rows, 1 columns)
+- caption:
+- alignment of column 1: d
+- row 1, column 1: Header
+- row 2, column 1: Cell
+END table
+interblockSeparator
+horizontalRule
+interblockSeparator
+interblockSeparator
+BEGIN table (3 rows, 4 columns)
+- caption:
+- alignment of column 1: d
+- alignment of column 2: l
+- alignment of column 3: c
+- alignment of column 4: r
+- row 1, column 1: Default
+- row 1, column 2: Right
+- row 1, column 3: Center
+- row 1, column 4: Left
+- row 2, column 1: Long Cell
+- row 2, column 2: Long Cell
+- row 2, column 3: Long Cell
+- row 2, column 4: Long Cell
+- row 3, column 1: Cell
+- row 3, column 2: Cell
+- row 3, column 3: Cell
+- row 3, column 4: Cell
+END table
+interblockSeparator
+interblockSeparator
+BEGIN table (3 rows, 4 columns)
+- caption:
+- alignment of column 1: d
+- alignment of column 2: l
+- alignment of column 3: c
+- alignment of column 4: r
+- row 1, column 1: Default
+- row 1, column 2: Right
+- row 1, column 3: Center
+- row 1, column 4: Left
+- row 2, column 1: Long Cell
+- row 2, column 2: Long Cell
+- row 2, column 3: Long Cell
+- row 2, column 4: Long Cell
+- row 3, column 1: Cell
+- row 3, column 2: Cell
+- row 3, column 3: Cell
+- row 3, column 4: Cell
+END table
+interblockSeparator
+horizontalRule
+interblockSeparator
+headingOne: Empty cells
+interblockSeparator
+BEGIN table (3 rows, 2 columns)
+- caption:
+- alignment of column 1: d
+- alignment of column 2: d
+- row 1, column 1: Header 1
+- row 1, column 2: Header 2
+- row 2, column 1: A
+- row 2, column 2: B
+- row 3, column 1: C
+- row 3, column 2:
+END table
+interblockSeparator
+BEGIN table (3 rows, 2 columns)
+- caption:
+- alignment of column 1: d
+- alignment of column 2: d
+- row 1, column 1: Header 1
+- row 1, column 2: Header 2
+- row 2, column 1: A
+- row 2, column 2: B
+- row 3, column 1:
+- row 3, column 2: D
+END table
+interblockSeparator
+horizontalRule
+interblockSeparator
+headingOne: Missing tailing pipe
+interblockSeparator
+BEGIN table (3 rows, 2 columns)
+- caption:
+- alignment of column 1: d
+- alignment of column 2: d
+- row 1, column 1: Header 1
+- row 1, column 2: Header 2
+- row 2, column 1: Cell
+- row 2, column 2: Cell
+- row 3, column 1: Cell
+- row 3, column 2: Cell
+END table
+interblockSeparator
+BEGIN table (3 rows, 2 columns)
+- caption:
+- alignment of column 1: d
+- alignment of column 2: d
+- row 1, column 1: Header 1
+- row 1, column 2: Header 2
+- row 2, column 1: Cell
+- row 2, column 2: Cell
+- row 3, column 1: Cell
+- row 3, column 2: Cell
+END table
+interblockSeparator
+BEGIN table (3 rows, 2 columns)
+- caption:
+- alignment of column 1: d
+- alignment of column 2: d
+- row 1, column 1: Header 1
+- row 1, column 2: Header 2
+- row 2, column 1: Cell
+- row 2, column 2: Cell
+- row 3, column 1: Cell
+- row 3, column 2: Cell
+END table
+interblockSeparator
+BEGIN table (3 rows, 2 columns)
+- caption:
+- alignment of column 1: d
+- alignment of column 2: d
+- row 1, column 1: Header 1
+- row 1, column 2: Header 2
+- row 2, column 1: Cell
+- row 2, column 2: Cell
+- row 3, column 1: Cell
+- row 3, column 2: Cell
+END table
+interblockSeparator
+horizontalRule
+interblockSeparator
+headingOne: Too many pipes in rows
+interblockSeparator
+BEGIN table (3 rows, 1 columns)
+- caption:
+- alignment of column 1: d
+- row 1, column 1: Header 1
+- row 2, column 1: Cell
+- row 3, column 1: Cell
+END table
diff --git a/macros/generic/markdown/tests/testfiles/PHP_Markdown/tight-blocks.test b/macros/generic/markdown/tests/testfiles/PHP_Markdown/tight-blocks.test
new file mode 100644
index 0000000000..b8f0650113
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/PHP_Markdown/tight-blocks.test
@@ -0,0 +1,30 @@
+<<<
+Paragraph and no space:
+* ciao
+
+Paragraph and 1 space:
+ * ciao
+
+Paragraph and 3 spaces:
+ * ciao
+
+Paragraph and 4 spaces:
+ * ciao
+
+Paragraph before header:
+#Header
+
+Paragraph before blockquote:
+>Some quote.
+
+>>>
+interblockSeparator
+interblockSeparator
+interblockSeparator
+interblockSeparator
+interblockSeparator
+headingOne: Header
+interblockSeparator
+interblockSeparator
+blockQuoteBegin
+blockQuoteEnd