Skip to content

Commit 3043937

Browse files
committed
Add LISTING tests
1 parent f7d903e commit 3043937

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

tests/phpunit/tests/html-api/wpHtmlProcessor-serialize.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,22 @@ public static function data_provider_normalize_special_leading_newline_cases() {
354354
"<pre>\n\nline 2<!--comment--> still line 2</pre>",
355355
"<pre>\n\nline 2<!--comment--> still line 2</pre>",
356356
),
357+
'Leading newline in LISTING' => array(
358+
"<listing>\nline 1\nline 2</listing>",
359+
"<listing>line 1\nline 2</listing>",
360+
),
361+
'Double leading newline in LISTING' => array(
362+
"<listing>\n\nline 2\nline 3</listing>",
363+
"<listing>\n\nline 2\nline 3</listing>",
364+
),
365+
'Multiple text nodes inside LISTING' => array(
366+
"<listing>\nline 1<!--comment--> still line 1</listing>",
367+
'<listing>line 1<!--comment--> still line 1</listing>',
368+
),
369+
'Multiple text nodes inside LISTING with leading newlines' => array(
370+
"<listing>\n\nline 2<!--comment--> still line 2</listing>",
371+
"<listing>\n\nline 2<!--comment--> still line 2</listing>",
372+
),
357373
'Leading newline in TEXTAREA' => array(
358374
"<textarea>\nline 1\nline 2</textarea>",
359375
"<textarea>line 1\nline 2</textarea>",

0 commit comments

Comments
 (0)