[Pkg-javascript-commits] [node-expat] 81/371: adds fail test to double parse the same document with the same parser instance
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 b24d9a2426a30973cf92611d4ca000f328a1a7f8
Author: Camilo Aguilar <camilo.aguilar at gmail.com>
Date: Fri Jul 1 15:08:46 2011 -0400
adds fail test to double parse the same document with the same parser instance
---
test.js | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/test.js b/test.js
index 976839b..e2012c6 100644
--- a/test.js
+++ b/test.js
@@ -235,6 +235,15 @@ vows.describe('node-expat').addBatch({
var p = new expat.Parser("UTF-8");
p.parse('');
assert.ok(true, "Did not segfault");
- }
+ },
+
+ 'parsing twice the same document with the same parser instance should be fine': function() {
+ var p = new expat.Parser("UTF-8");
+ var xml = "<foo>bar</foo>";
+ var result = p.parse(xml);
+ assert.ok(result);
+ var result2 = p.parse(xml);
+ assert.ok(result2);
+ }
}
}).run();
--
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