Skip to content

Commit 0f246c9

Browse files
author
calibr
committed
add failed multi line entity
1 parent 03aaf66 commit 0f246c9

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

test/multi_line.dtd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<!ENTITY donate_message "multi
2+
line
3+
dtd">

test/test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,10 @@ describe("Common", function() {
4343
var str = parser.stringify(object);
4444
str.should.equal('<!ENTITY key1 "value1 with \\"text\\" test">\n<!ENTITY key2 "value2\'\'xxx">');
4545
});
46+
47+
it("should parse multi line entity", function() {
48+
var raw = fs.readFileSync(__dirname + "/multi_line.dtd", "utf8");
49+
var result = parser.parse(raw);
50+
result["donate_message"].should.equal("multi\nline\ndtd");
51+
});
4652
});

0 commit comments

Comments
 (0)