Date: Fri, 12 Feb 2010 16:24:15 -0500
Subject: Moved test dir back out of markdown lib. We don't need to install the
tests in everyones site-packages. We just need to distrubute them in the
tarball for people to run before installing etc.
---
tests/php/extra/Abbr.text | 31 +++
tests/php/extra/Abbr.xhtml | 15 +
tests/php/extra/Definition Lists.text | 115 ++++++++
tests/php/extra/Definition Lists.xhtml | 155 +++++++++++
tests/php/extra/Emphasis.text | 80 ++++++
tests/php/extra/Emphasis.xhtml | 83 ++++++
tests/php/extra/Fenced Code Blocks.text | 60 ++++
tests/php/extra/Fenced Code Blocks.xhtml | 53 ++++
tests/php/extra/Footnotes.text | 61 ++++
tests/php/extra/Footnotes.xhtml | 96 +++++++
.../extra/Inline HTML with Markdown content.text | 104 +++++++
.../extra/Inline HTML with Markdown content.xhtml | 125 +++++++++
tests/php/extra/Tables.text | 104 +++++++
tests/php/extra/Tables.xhtml | 310 +++++++++++++++++++++
tests/php/extra/test.cfg | 6 +
15 files changed, 1398 insertions(+)
create mode 100644 tests/php/extra/Abbr.text
create mode 100644 tests/php/extra/Abbr.xhtml
create mode 100644 tests/php/extra/Definition Lists.text
create mode 100644 tests/php/extra/Definition Lists.xhtml
create mode 100644 tests/php/extra/Emphasis.text
create mode 100644 tests/php/extra/Emphasis.xhtml
create mode 100644 tests/php/extra/Fenced Code Blocks.text
create mode 100644 tests/php/extra/Fenced Code Blocks.xhtml
create mode 100644 tests/php/extra/Footnotes.text
create mode 100644 tests/php/extra/Footnotes.xhtml
create mode 100644 tests/php/extra/Inline HTML with Markdown content.text
create mode 100644 tests/php/extra/Inline HTML with Markdown content.xhtml
create mode 100644 tests/php/extra/Tables.text
create mode 100644 tests/php/extra/Tables.xhtml
create mode 100644 tests/php/extra/test.cfg
(limited to 'tests/php/extra')
diff --git a/tests/php/extra/Abbr.text b/tests/php/extra/Abbr.text
new file mode 100644
index 0000000..ae72f4e
--- /dev/null
+++ b/tests/php/extra/Abbr.text
@@ -0,0 +1,31 @@
+Some text about HTML, SGML and HTML4.
+
+Let's talk about the U.S.A., (É.U. or É.-U. d'A. in French).
+
+*[HTML4]: Hyper Text Markup Language version 4
+*[HTML]: Hyper Text Markup Language
+*[SGML]: Standard Generalized Markup Language
+*[U.S.A.]: United States of America
+*[É.U.] : États-Unis d'Amérique
+*[É.-U. d'A.] : États-Unis d'Amérique
+
+And here we have a CD, some CDs, and some other CD's.
+
+*[CD]: Compact Disk
+
+Let's transfert documents through TCP/IP, using TCP packets.
+
+*[IP]: Internet Protocol
+*[TCP]: Transmission Control Protocol
+
+ ---
+
+Bienvenue sur [CMS](http://www.bidulecms.com "Bidule CMS").
+
+*[CMS]: Content Management System
+
+ ---
+
+ATCCE
+
+*[ATCCE]: Abbreviation "Testing" Correct 'Character' < Escapes >
\ No newline at end of file
diff --git a/tests/php/extra/Abbr.xhtml b/tests/php/extra/Abbr.xhtml
new file mode 100644
index 0000000..8beaa2e
--- /dev/null
+++ b/tests/php/extra/Abbr.xhtml
@@ -0,0 +1,15 @@
+Some text about HTML, SGML and HTML4.
+
+Let's talk about the U.S.A., (É.U. or É.-U. d'A. in French).
+
+And here we have a CD, some CDs, and some other CD's.
+
+Let's transfert documents through TCP/IP, using TCP packets.
+
+
+
+Bienvenue sur CMS.
+
+
+
+ATCCE
diff --git a/tests/php/extra/Definition Lists.text b/tests/php/extra/Definition Lists.text
new file mode 100644
index 0000000..5b3bdb6
--- /dev/null
+++ b/tests/php/extra/Definition Lists.text
@@ -0,0 +1,115 @@
+A simple definition list:
+
+Term 1
+: Definition 1
+
+Term 2
+: Definition 2
+
+With multiple terms:
+
+Term 1
+Term 2
+: Definition 1
+
+Term 3
+Term 4
+: Definition 2
+
+With multiple definitions:
+
+Term 1
+: Definition 1
+: Definition 2
+
+Term 2
+: Definition 3
+: Definition 4
+
+With multiple lines per definition:
+
+Term 1
+: Definition 1 line 1 ...
+Definition 1 line 2
+: Definition 2 line 1 ...
+Definition 2 line 2
+
+Term 2
+: Definition 3 line 2 ...
+ Definition 3 line 2
+: Definition 4 line 2 ...
+ Definition 4 line 2
+
+With paragraphs:
+
+Term 1
+
+: Definition 1 (paragraph)
+
+Term 2
+
+: Definition 2 (paragraph)
+
+With multiple paragraphs:
+
+Term 1
+
+: Definition 1 paragraph 1 line 1 ...
+ Definition 1 paragraph 1 line 2
+
+ Definition 1 paragraph 2 line 1 ...
+ Definition 1 paragraph 2 line 2
+
+Term 2
+
+: Definition 1 paragraph 1 line 1 ...
+Definition 1 paragraph 1 line 2 (lazy)
+
+ Definition 1 paragraph 2 line 1 ...
+Definition 1 paragraph 2 line 2 (lazy)
+
+* * *
+
+A mix:
+
+Term 1
+Term 2
+
+: Definition 1 paragraph 1 line 1 ...
+Definition 1 paragraph 1 line 2 (lazy)
+
+ Definition 1 paragraph 2 line 1 ...
+ Definition 1 paragraph 2 line 2
+
+: Definition 2 paragraph 1 line 1 ...
+Definition 2 paragraph 1 line 2 (lazy)
+
+Term 3
+: Definition 3 (no paragraph)
+: Definition 4 (no paragraph)
+: Definition 5 line 1 ...
+ Definition 5 line 2 (no paragraph)
+
+: Definition 6 paragraph 1 line 1 ...
+Definition 6 paragraph 1 line 2
+: Definition 7 (no paragraph)
+: Definition 8 paragraph 1 line 1 (forced paragraph) ...
+ Definition 8 paragraph 1 line 2
+
+ Definition 8 paragraph 2 line 1
+
+Term 4
+: Definition 9 paragraph 1 line 1 (forced paragraph) ...
+ Definition 9 paragraph 1 line 2
+
+ Definition 9 paragraph 2 line 1
+: Definition 10 (no paragraph)
+
+* * *
+
+Special cases:
+
+Term
+
+: code block
+ as first element of a definition
\ No newline at end of file
diff --git a/tests/php/extra/Definition Lists.xhtml b/tests/php/extra/Definition Lists.xhtml
new file mode 100644
index 0000000..f99f456
--- /dev/null
+++ b/tests/php/extra/Definition Lists.xhtml
@@ -0,0 +1,155 @@
+A simple definition list:
+
+
+- Term 1
+- Definition 1
+
+- Term 2
+- Definition 2
+
+
+With multiple terms:
+
+
+- Term 1
+- Term 2
+- Definition 1
+
+- Term 3
+- Term 4
+- Definition 2
+
+
+With multiple definitions:
+
+
+- Term 1
+- Definition 1
+
+- Definition 2
+
+- Term 2
+- Definition 3
+
+- Definition 4
+
+
+With multiple lines per definition:
+
+
+- Term 1
+- Definition 1 line 1 ...
+Definition 1 line 2
+
+- Definition 2 line 1 ...
+Definition 2 line 2
+
+- Term 2
+- Definition 3 line 2 ...
+Definition 3 line 2
+
+- Definition 4 line 2 ...
+Definition 4 line 2
+
+
+With paragraphs:
+
+
+- Term 1
+-
+
Definition 1 (paragraph)
+
+
+- Term 2
+-
+
Definition 2 (paragraph)
+
+
+
+With multiple paragraphs:
+
+
+- Term 1
+-
+
Definition 1 paragraph 1 line 1 ...
+Definition 1 paragraph 1 line 2
+
+Definition 1 paragraph 2 line 1 ...
+Definition 1 paragraph 2 line 2
+
+
+- Term 2
+-
+
Definition 1 paragraph 1 line 1 ...
+Definition 1 paragraph 1 line 2 (lazy)
+
+Definition 1 paragraph 2 line 1 ...
+Definition 1 paragraph 2 line 2 (lazy)
+
+
+
+
+
+A mix:
+
+
+- Term 1
+- Term 2
+-
+
Definition 1 paragraph 1 line 1 ...
+Definition 1 paragraph 1 line 2 (lazy)
+
+Definition 1 paragraph 2 line 1 ...
+Definition 1 paragraph 2 line 2
+
+
+-
+
Definition 2 paragraph 1 line 1 ...
+Definition 2 paragraph 1 line 2 (lazy)
+
+
+- Term 3
+- Definition 3 (no paragraph)
+
+- Definition 4 (no paragraph)
+
+- Definition 5 line 1 ...
+Definition 5 line 2 (no paragraph)
+
+-
+
Definition 6 paragraph 1 line 1 ...
+Definition 6 paragraph 1 line 2
+
+
+- Definition 7 (no paragraph)
+
+-
+
Definition 8 paragraph 1 line 1 (forced paragraph) ...
+Definition 8 paragraph 1 line 2
+
+Definition 8 paragraph 2 line 1
+
+
+- Term 4
+-
+
Definition 9 paragraph 1 line 1 (forced paragraph) ...
+Definition 9 paragraph 1 line 2
+
+Definition 9 paragraph 2 line 1
+
+
+- Definition 10 (no paragraph)
+
+
+
+
+Special cases:
+
+
+- Term
+-
+
code block
+as first element of a definition
+
+
+
diff --git a/tests/php/extra/Emphasis.text b/tests/php/extra/Emphasis.text
new file mode 100644
index 0000000..88e93d4
--- /dev/null
+++ b/tests/php/extra/Emphasis.text
@@ -0,0 +1,80 @@
+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____
diff --git a/tests/php/extra/Emphasis.xhtml b/tests/php/extra/Emphasis.xhtml
new file mode 100644
index 0000000..1fa8218
--- /dev/null
+++ b/tests/php/extra/Emphasis.xhtml
@@ -0,0 +1,83 @@
+Combined emphasis:
+
+
+- test test
+- test test
+- test test
+- test test
+- test test
+- test test
+- test test
+- test test
+- test test
+- test test
+- test test
+- test test
+- test test
+- test test
+- test test
+- test test
+
+
+Incorrect nesting:
+
+
+- *test test* test
+- _test test_ test
+- test *test test*
+- test _test test_
+- test *test test*
+- test _test test_
+- test **test test**
+- test __test test__
+
+
+No emphasis:
+
+
+- test* test *test
+- test** test **test
+- test_ test _test
+- test__ test __test
+
+
+Middle-word emphasis (asterisks):
+
+
+- ab
+- ab
+- abc
+- ab
+- ab
+- abc
+
+
+Middle-word emphasis (underscore):
+
+
+- _a_b
+- a_b_
+- a_b_c
+- __a__b
+- a__b__
+- 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____
diff --git a/tests/php/extra/Fenced Code Blocks.text b/tests/php/extra/Fenced Code Blocks.text
new file mode 100644
index 0000000..f2400ff
--- /dev/null
+++ b/tests/php/extra/Fenced Code Blocks.text
@@ -0,0 +1,60 @@
+~~~
+Fenced
+~~~
+
+Code block starting and ending with empty lines:
+~~~
+
+
+Fenced
+
+
+~~~
+
+Indented code block containing fenced code block sample:
+
+ ~~~
+ Fenced
+ ~~~
+
+Fenced code block with indented code block sample:
+
+~~~
+Some text
+
+ Indented code block sample code
+~~~
+
+Fenced code block with long markers:
+
+~~~~~~~~~~~~~~~~~~
+Fenced
+~~~~~~~~~~~~~~~~~~
+
+Fenced code block with fenced code block markers of different length in it:
+
+~~~~
+In code block
+~~~
+Still in code block
+~~~~~
+Still in code block
+~~~~
+
+Fenced code block with Markdown header and horizontal rule:
+
+~~~
+#test
+---
+~~~
+
+Fenced code block with link definitions, footnote definition and
+abbreviation definitions:
+
+~~~
+[example]: http://example.com/
+
+[^1]: Footnote def
+
+*[HTML]: HyperText Markup Language
+~~~
\ No newline at end of file
diff --git a/tests/php/extra/Fenced Code Blocks.xhtml b/tests/php/extra/Fenced Code Blocks.xhtml
new file mode 100644
index 0000000..518908c
--- /dev/null
+++ b/tests/php/extra/Fenced Code Blocks.xhtml
@@ -0,0 +1,53 @@
+Fenced
+
+
+Code block starting and ending with empty lines:
+
+
Fenced
+
+
+
+
+Indented code block containing fenced code block sample:
+
+~~~
+Fenced
+~~~
+
+
+Fenced code block with indented code block sample:
+
+Some text
+
+ Indented code block sample code
+
+
+Fenced code block with long markers:
+
+Fenced
+
+
+Fenced code block with fenced code block markers of different length in it:
+
+In code block
+~~~
+Still in code block
+~~~~~
+Still in code block
+
+
+Fenced code block with Markdown header and horizontal rule:
+
+#test
+---
+
+
+Fenced code block with link definitions, footnote definition and
+abbreviation definitions:
+
+[example]: http://example.com/
+
+[^1]: Footnote def
+
+*[HTML]: HyperText Markup Language
+
diff --git a/tests/php/extra/Footnotes.text b/tests/php/extra/Footnotes.text
new file mode 100644
index 0000000..40192e9
--- /dev/null
+++ b/tests/php/extra/Footnotes.text
@@ -0,0 +1,61 @@
+This is the first paragraph.[^first]
+
+[^first]: This is the first note.
+
+* List item one.[^second]
+* List item two.[^third]
+
+[^third]: This is the third note, defined out of order.
+[^second]: This is the second note.
+[^fourth]: This is the fourth note.
+
+# Header[^fourth]
+
+Some paragraph with a footnote[^1], and another[^2].
+
+[^1]: Content for fifth footnote.
+[^2]: Content for sixth footnote spaning on
+ three lines, with some span-level markup like
+ _emphasis_, a [link][].
+
+[link]: http://www.michelf.com/
+
+Another paragraph with a named footnote[^fn-name].
+
+[^fn-name]:
+ Footnote beginning on the line next to the marker.
+
+This paragraph should not have a footnote marker since
+the footnote is undefined.[^3]
+
+This paragraph should not have a footnote marker since
+the footnote has already been used before.[^1]
+
+This paragraph links to a footnote with plenty of
+block-level content.[^block]
+
+[^block]:
+ Paragraph.
+
+ * List item
+
+ > Blockquote
+
+ Code block
+
+This paragraph host the footnote reference within a
+footnote test[^reference].
+
+[^reference]:
+ This footnote has a footnote of its own.[^nested]
+
+[^nested]:
+ This footnote should appear even though as it is refered
+ from another footnote. But [^reference] should be litteral
+ since the footnote with that name has already been used.
+
+ - - -
+
+Testing unusual footnote name[^1$^!"'].
+
+[^1$^!"']: Haha!
diff --git a/tests/php/extra/Footnotes.xhtml b/tests/php/extra/Footnotes.xhtml
new file mode 100644
index 0000000..e33639d
--- /dev/null
+++ b/tests/php/extra/Footnotes.xhtml
@@ -0,0 +1,96 @@
+This is the first paragraph.1
+
+
+- List item one.2
+- List item two.3
+
+
+Header4
+
+Some paragraph with a footnote5, and another6.
+
+Another paragraph with a named footnote7.
+
+This paragraph should not have a footnote marker since
+the footnote is undefined.[^3]
+
+This paragraph should not have a footnote marker since
+the footnote has already been used before.[^1]
+
+This paragraph links to a footnote with plenty of
+block-level content.8
+
+This paragraph host the footnote reference within a
+footnote test9.
+
+
+
+Testing unusual footnote name10.
+
+
diff --git a/tests/php/extra/Inline HTML with Markdown content.text b/tests/php/extra/Inline HTML with Markdown content.text
new file mode 100644
index 0000000..1eb5450
--- /dev/null
+++ b/tests/php/extra/Inline HTML with Markdown content.text
@@ -0,0 +1,104 @@
+# Markdown inside code blocks
+
+
+foo
+
+
+
+foo
+
+
+
+foo
+
+
+
+test _emphasis_ (span) |
+
+
+
+test _emphasis_ (span) |
+
+
+
+test _emphasis_ (block) |
+
+
+## More complicated
+
+
+
+* this is _not_ a list item |
+
+* this is _not_ a list item |
+
+* this _is_ a list item
+ |
+
+
+## With indent
+
+
+
+ This text is no code block: if it was, the
+ closing `
` would be too and the HTML block
+ would be invalid.
+
+ Markdown content in HTML blocks is assumed to be
+ indented the same as the block opening tag.
+
+ **This should be the third paragraph after the header.**
+
+
+
+## Code block with rogue `
`s in Markdown code span and block
+
+
+
+
+ This is a code block however:
+
+
+
+ Funny isn't it? Here is a code span: `
`.
+
+
+
+
+
+
+ * List item, not a code block
+
+Some text
+
+ This is a code block.
+
+
+
+## No code block in markdown span mode
+
+
+ This is not a code block since Markdown parse paragraph
+ content as span. Code spans like `
` are allowed though.
+