Skip to content

Commit

Permalink
Add Tests for Issue #294
Browse files Browse the repository at this point in the history
  • Loading branch information
DotJoshJohnson committed Jul 26, 2020
1 parent 95702e6 commit e6ca8f5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ describe("V2XmlFormatter", () => {
it("should not add trailing whitespace", () => {
testFormatter(xmlFormatter, options, "issue-288");
});

it("should handle mixed content on the same line as another element", () => {
testFormatter(xmlFormatter, options, "issue-294");
});
});

describe("#minifyXml(xml, options)", () => {
Expand Down
7 changes: 7 additions & 0 deletions src/test/test-data/issue-294.formatted.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0">
<div>
ThisCausesBug <img src="test"/>
<img src="test"/>
</div>
</xsl:stylesheet>
7 changes: 7 additions & 0 deletions src/test/test-data/issue-294.unformatted.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0">
<div>
ThisCausesBug <img src="test"/>
<img src="test"/>
</div>
</xsl:stylesheet>

0 comments on commit e6ca8f5

Please sign in to comment.