[Pkg-javascript-commits] [node-expat] 290/371: Add double parsing test back in

Jonas Smedegaard dr at jones.dk
Sun Feb 28 10:00:21 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 9fad9092aefd872ac93833f0f2b73db4b6e077e9
Author: Lloyd Watkin <lloyd.watkin at surevine.com>
Date:   Mon Nov 24 13:29:48 2014 +0000

    Add double parsing test back in
---
 test/index.js | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/test/index.js b/test/index.js
index 55b805c..e7eaa0b 100644
--- a/test/index.js
+++ b/test/index.js
@@ -327,6 +327,17 @@ vows.describe('node-expat').addBatch({
             [['startElement', 'e', {}],
             ['text', 'foo & bar'],
             ['endElement', 'e']])
+        },
+        '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)
+           assert.isNull(p.getError())
+           p.reset()
+           var result2 = p.parse(xml)
+           assert.isNull(p.getError())
+           assert.ok(result2)
         }
     },
     'statistics': {

-- 
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