From be963a6531001b7d87083fb3f77b0df525ebc8db Mon Sep 17 00:00:00 2001 From: Daniel Berthereau Date: Mon, 19 Jun 2017 00:00:00 +0200 Subject: [PATCH] Added tests for consistency when a markdown follows a markup without blank line. --- test/ParsedownTest.php | 3 ++- test/data/markup_consecutive_one.html | 3 +++ test/data/markup_consecutive_one.md | 4 ++++ test/data/markup_consecutive_one_line.html | 4 ++++ test/data/markup_consecutive_one_line.md | 5 +++++ test/data/markup_consecutive_one_stripped.html | 3 +++ test/data/markup_consecutive_one_stripped.md | 4 ++++ test/data/markup_consecutive_two.html | 3 +++ test/data/markup_consecutive_two.md | 4 ++++ test/data/markup_consecutive_two_lines.html | 4 ++++ test/data/markup_consecutive_two_lines.md | 5 +++++ test/data/markup_consecutive_two_stripped.html | 4 ++++ test/data/markup_consecutive_two_stripped.md | 5 +++++ 13 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 test/data/markup_consecutive_one.html create mode 100644 test/data/markup_consecutive_one.md create mode 100644 test/data/markup_consecutive_one_line.html create mode 100644 test/data/markup_consecutive_one_line.md create mode 100644 test/data/markup_consecutive_one_stripped.html create mode 100644 test/data/markup_consecutive_one_stripped.md create mode 100644 test/data/markup_consecutive_two.html create mode 100644 test/data/markup_consecutive_two.md create mode 100644 test/data/markup_consecutive_two_lines.html create mode 100644 test/data/markup_consecutive_two_lines.md create mode 100644 test/data/markup_consecutive_two_stripped.html create mode 100644 test/data/markup_consecutive_two_stripped.md diff --git a/test/ParsedownTest.php b/test/ParsedownTest.php index 323dace..bef612b 100644 --- a/test/ParsedownTest.php +++ b/test/ParsedownTest.php @@ -10,7 +10,8 @@ class ParsedownTest extends PHPUnit_Framework_TestCase parent::__construct($name, $data, $dataName); } - private $dirs, $Parsedown; + private $dirs; + protected $Parsedown; /** * @return array diff --git a/test/data/markup_consecutive_one.html b/test/data/markup_consecutive_one.html new file mode 100644 index 0000000..a0b1fca --- /dev/null +++ b/test/data/markup_consecutive_one.html @@ -0,0 +1,3 @@ +
Markup
+

No markdown without blank line if strict compliance, but main processors convert it.

+

Markdown

\ No newline at end of file diff --git a/test/data/markup_consecutive_one.md b/test/data/markup_consecutive_one.md new file mode 100644 index 0000000..7a00770 --- /dev/null +++ b/test/data/markup_consecutive_one.md @@ -0,0 +1,4 @@ +
Markup
+_No markdown_ without blank line if strict compliance, but **main** processors convert it. + +**Markdown** \ No newline at end of file diff --git a/test/data/markup_consecutive_one_line.html b/test/data/markup_consecutive_one_line.html new file mode 100644 index 0000000..2a301aa --- /dev/null +++ b/test/data/markup_consecutive_one_line.html @@ -0,0 +1,4 @@ +
One markup on +two lines
+

Markdown

+

Markdown

\ No newline at end of file diff --git a/test/data/markup_consecutive_one_line.md b/test/data/markup_consecutive_one_line.md new file mode 100644 index 0000000..d40609a --- /dev/null +++ b/test/data/markup_consecutive_one_line.md @@ -0,0 +1,5 @@ +
One markup on +two lines
+_Markdown_ + +**Markdown** \ No newline at end of file diff --git a/test/data/markup_consecutive_one_stripped.html b/test/data/markup_consecutive_one_stripped.html new file mode 100644 index 0000000..eb5136b --- /dev/null +++ b/test/data/markup_consecutive_one_stripped.html @@ -0,0 +1,3 @@ +

Stripped markup

+

Markdown

+

Markdown

\ No newline at end of file diff --git a/test/data/markup_consecutive_one_stripped.md b/test/data/markup_consecutive_one_stripped.md new file mode 100644 index 0000000..4189580 --- /dev/null +++ b/test/data/markup_consecutive_one_stripped.md @@ -0,0 +1,4 @@ +

Stripped markup

+_Markdown_ + +**Markdown** \ No newline at end of file diff --git a/test/data/markup_consecutive_two.html b/test/data/markup_consecutive_two.html new file mode 100644 index 0000000..efcebcd --- /dev/null +++ b/test/data/markup_consecutive_two.html @@ -0,0 +1,3 @@ +
First markup

and second markup on the same line.

+

Markdown

+

Markdown

\ No newline at end of file diff --git a/test/data/markup_consecutive_two.md b/test/data/markup_consecutive_two.md new file mode 100644 index 0000000..bd663ac --- /dev/null +++ b/test/data/markup_consecutive_two.md @@ -0,0 +1,4 @@ +
First markup

and second markup on the same line.

+_Markdown_ + +**Markdown** \ No newline at end of file diff --git a/test/data/markup_consecutive_two_lines.html b/test/data/markup_consecutive_two_lines.html new file mode 100644 index 0000000..cfa1463 --- /dev/null +++ b/test/data/markup_consecutive_two_lines.html @@ -0,0 +1,4 @@ +
First markup

and partial markup +on two lines.

+

Markdown

+

Markdown

\ No newline at end of file diff --git a/test/data/markup_consecutive_two_lines.md b/test/data/markup_consecutive_two_lines.md new file mode 100644 index 0000000..66318e9 --- /dev/null +++ b/test/data/markup_consecutive_two_lines.md @@ -0,0 +1,5 @@ +
First markup

and partial markup +on two lines.

+_Markdown_ + +**Markdown** \ No newline at end of file diff --git a/test/data/markup_consecutive_two_stripped.html b/test/data/markup_consecutive_two_stripped.html new file mode 100644 index 0000000..1633678 --- /dev/null +++ b/test/data/markup_consecutive_two_stripped.html @@ -0,0 +1,4 @@ +

Stripped markup +on two lines

+

Markdown

+

Markdown

\ No newline at end of file diff --git a/test/data/markup_consecutive_two_stripped.md b/test/data/markup_consecutive_two_stripped.md new file mode 100644 index 0000000..8173380 --- /dev/null +++ b/test/data/markup_consecutive_two_stripped.md @@ -0,0 +1,5 @@ +

Stripped markup +on two lines

+_Markdown_ + +**Markdown** \ No newline at end of file