aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-04-10 14:33:36 +0100
committerMichael Williamson <mike@zwobble.org>2014-04-10 14:33:36 +0100
commit0201587bec80aac0c1dcbf12c50ea6d459321585 (patch)
tree58a158b542e4ec76ceec81c4bde8a8c64b34ed48 /tests
parent91eb47cc9c8b82bc171f818046c8100e3420a2b2 (diff)
Indent appened HTML
Diffstat (limited to 'tests')
-rw-r--r--tests/html-writer.tests.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/html-writer.tests.js b/tests/html-writer.tests.js
index de8b76f..c40cda4 100644
--- a/tests/html-writer.tests.js
+++ b/tests/html-writer.tests.js
@@ -66,4 +66,12 @@ describe('html-writer', function() {
writer.close("p");
return assert.equal(writer.asString(), "<p>\n <br />\n</p>");
});
+
+ test('newlines in appended HTML are indented', function() {
+ var writer = htmlWriter.writer({prettyPrint: true});
+ writer.open("p");
+ writer.append("One\nTwo");
+ writer.close("p");
+ return assert.equal(writer.asString(), "<p>\n One\n Two\n</p>");
+ });
})