From 0be504abb4e81f8fd44b0445f641366ff2f778c4 Mon Sep 17 00:00:00 2001 From: davidodenwald Date: Thu, 1 Dec 2022 19:39:11 +0100 Subject: [PATCH] add more tests --- src/parser.ts | 2 -- test/cases/empty/expected.html | 0 test/cases/empty/input.html | 0 test/cases/statement_broken_3/expected.html | 1 + test/cases/statement_broken_3/input.html | 5 +++++ 5 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 test/cases/empty/expected.html create mode 100644 test/cases/empty/input.html create mode 100644 test/cases/statement_broken_3/expected.html create mode 100644 test/cases/statement_broken_3/input.html diff --git a/src/parser.ts b/src/parser.ts index 05f92b6..8c26355 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -7,8 +7,6 @@ import { Statement, Block, nonClosingStatements, - Expression, - IgnoreBlock, } from "./jinja"; const regex = diff --git a/test/cases/empty/expected.html b/test/cases/empty/expected.html new file mode 100644 index 0000000..e69de29 diff --git a/test/cases/empty/input.html b/test/cases/empty/input.html new file mode 100644 index 0000000..e69de29 diff --git a/test/cases/statement_broken_3/expected.html b/test/cases/statement_broken_3/expected.html new file mode 100644 index 0000000..f124eca --- /dev/null +++ b/test/cases/statement_broken_3/expected.html @@ -0,0 +1 @@ +Error('Closung statement "endif" doesn't match Opening Statement "for item in seq".') diff --git a/test/cases/statement_broken_3/input.html b/test/cases/statement_broken_3/input.html new file mode 100644 index 0000000..a97e924 --- /dev/null +++ b/test/cases/statement_broken_3/input.html @@ -0,0 +1,5 @@ + \ No newline at end of file