From be6bb72b82da3ba02d9afac554095d34c29bd8d7 Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Fri, 21 Dec 2018 14:46:35 -0500 Subject: [PATCH] Add Failing Test --- src/test/extension.test.ts | 4 ++++ src/test/test-data/issue-235.formatted.xml | 7 +++++++ src/test/test-data/issue-235.unformatted.xml | 1 + 3 files changed, 12 insertions(+) create mode 100644 src/test/test-data/issue-235.formatted.xml create mode 100644 src/test/test-data/issue-235.unformatted.xml diff --git a/src/test/extension.test.ts b/src/test/extension.test.ts index 675aa6b..07b57db 100644 --- a/src/test/extension.test.ts +++ b/src/test/extension.test.ts @@ -95,6 +95,10 @@ describe("V2XmlFormatter", () => { it("should not remove spaces between the node name and the first attribute within CDATA", () => { testFormatter(xmlFormatter, options, "issue-227"); }); + + it("should optionally add line break after self-closing tag", () => { + testFormatter(xmlFormatter, options, "issue-235"); + }); }); }); diff --git a/src/test/test-data/issue-235.formatted.xml b/src/test/test-data/issue-235.formatted.xml new file mode 100644 index 0000000..d0a4cd2 --- /dev/null +++ b/src/test/test-data/issue-235.formatted.xml @@ -0,0 +1,7 @@ +
+
+
+abc
+
+
+
\ No newline at end of file diff --git a/src/test/test-data/issue-235.unformatted.xml b/src/test/test-data/issue-235.unformatted.xml new file mode 100644 index 0000000..0628fbf --- /dev/null +++ b/src/test/test-data/issue-235.unformatted.xml @@ -0,0 +1 @@ +


abc



\ No newline at end of file