From ad57bbd5a2ef6787900b31e64cf1a3ea8c889006 Mon Sep 17 00:00:00 2001 From: Dustin Wilson Date: Thu, 18 Nov 2021 09:55:51 -0600 Subject: [PATCH] Added test to cover tab indention --- .gitignore | 4 ++-- tests/cases/TestSerializer.php | 44 ++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b41d514..dd90d07 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ # html5-parser specific manual node_modules -test*.html -test*.php +/test*.html +/test*.php /vendor/ /vendor-bin/*/vendor diff --git a/tests/cases/TestSerializer.php b/tests/cases/TestSerializer.php index 896c7fd..c974693 100644 --- a/tests/cases/TestSerializer.php +++ b/tests/cases/TestSerializer.php @@ -368,6 +368,50 @@ class TestSerializer extends \PHPUnit\Framework\TestCase { HTML ], + // Reformat whitespace, whitespace collapsing, custom indentions, tabs + [false, null, 1, false, false, true, false, false, + << + + + + + + + + + ook eek +
+                    This should be ignored
+
+                                also this
+                         
+
+

Ook + Eek!

+ + + HTML, + + << + + \t + + \took eek + \t\t
    This should be ignored
+
+                                also this
+                         
+ + \t\t
+ + \t\t

Ook Eek!

+ \t + + HTML + ], + // Fragment, html elements [true, 'div', 1, true, false, true, false, false, <<