[Pkg-javascript-commits] [ltx] 214/469: parse-test: text encoding tests
Jonas Smedegaard
dr at jones.dk
Wed Aug 31 13:03:05 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository ltx.
commit 7407772d9a044af4b09fae2b10a38be6fa755ce1
Author: Astro <astro at spaceboyz.net>
Date: Mon Mar 19 18:13:07 2012 +0100
parse-test: text encoding tests
---
test/parse-test.js | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/test/parse-test.js b/test/parse-test.js
index 86fd4dd..c510616 100644
--- a/test/parse-test.js
+++ b/test/parse-test.js
@@ -52,6 +52,16 @@ ltx.availableSaxParsers.forEach(function(saxParser) {
var el = parse(buf);
assert.equal(el.name, 'root');
assert.equal(0, el.children.length);
+ },
+ 'utf-8 text': function() {
+ var el = parse('<?xml version="1.0" encoding="utf-8"?><text>Möwe</text>');
+ assert.equal(el.name, 'text');
+ assert.equal(el.getText(), "Möwe");
+ },
+ 'iso8859-1 text': function() {
+ var el = parse('<?xml version="1.0" encoding="iso-8859-1"?><text>M\xF6we</text>');
+ assert.equal(el.name, 'text');
+ assert.equal(el.getText(), "Möwe");
}
}
}).export(module);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/ltx.git
More information about the Pkg-javascript-commits
mailing list