[Pkg-javascript-commits] [node-expat] 77/371: test.js: restore entityDecl test
Jonas Smedegaard
dr at jones.dk
Sun Feb 28 09:59:47 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository node-expat.
commit 78181b499c4e87db06a2ebc7746975cd55c74bc4
Author: Astro <astro at spaceboyz.net>
Date: Tue Jun 14 02:34:14 2011 +0200
test.js: restore entityDecl test
---
test.js | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/test.js b/test.js
index ad83b4d..8d3de5c 100644
--- a/test.js
+++ b/test.js
@@ -107,7 +107,9 @@ vows.describe('node-expat').addBatch({
'single element with CDATA content': function() {
expect("<r><![CDATA[<greeting>Hello, world!</greeting>]]></r>",
[['startElement', 'r', {}],
+ ['startCdata'],
['text', "<greeting>Hello, world!</greeting>"],
+ ['endCdata'],
['endElement', 'r']]);
},
'single element with entity text': function() {
@@ -129,6 +131,17 @@ vows.describe('node-expat').addBatch({
['endElement', 'foo']]);
}
},
+ 'entity declaration': {
+ 'a billion laughs': function() {
+ expect('<!DOCTYPE b [<!ELEMENT b (#PCDATA)>' +
+ '<!ENTITY l0 "ha"><!ENTITY l1 "&l0;&l0;"><!ENTITY l2 "&l1;&l1;">' +
+ ']><b>&l2;</b>',
+ [["entityDecl","l0",false,"ha",null,null,null,null],
+ ["entityDecl","l1",false,"&l0;&l0;",null,null,null,null],
+ ["entityDecl","l2",false,"&l1;&l1;",null,null,null,null],
+ ["startElement","b",{}],["text","hahahaha"],["endElement","b"]]);
+ }
+ },
'processing instruction': {
'with parameters': function() {
expect("<?i like xml?>",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-expat.git
More information about the Pkg-javascript-commits
mailing list