From d2d7170ae27803db5d041102d2456616ca89f323 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Tue, 15 Sep 2020 22:52:27 +0200 Subject: Tests: Also test parsing pseudotags --- tests/unit/ParserTest.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/unit/ParserTest.php b/tests/unit/ParserTest.php index 1e41ad0..b559913 100644 --- a/tests/unit/ParserTest.php +++ b/tests/unit/ParserTest.php @@ -172,6 +172,21 @@ class ParserTest extends TestCase ]), new VariableNode('-', 34, 'bar', []), ]], + + ['ignored', []], + + ['fooignoredbar', [ + // These are not two TextNodes as the parser will collapse adjacent TextNodes + new TextNode('-', 0, 'foobar'), + ]], + + ['$abc', [ + new TextNode('-', 0, '$abc'), + ]], + + ['$abc', [ + new TextNode('-', 0, '$abc'), + ]], ]; } @@ -252,6 +267,10 @@ class ParserTest extends TestCase ['~{foo|'], ['~{foo}'], ['~{'], + + // Unclosing pseudotags + ['foo'], + ['foo'], ]; } } -- cgit v1.2.3-70-g09d2