From bd65bb67e25a79b019d745b7262b2008ce2adb15 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 16 Nov 2016 01:59:39 +0100 Subject: incrementally verify denoms The denominations are not stored in a separate object store. --- node_modules/sax/test/attribute-name.js | 33 --------- node_modules/sax/test/attribute-no-space.js | 75 ------------------- node_modules/sax/test/buffer-overrun.js | 26 ------- node_modules/sax/test/case.js | 50 ------------- node_modules/sax/test/cdata-chunked.js | 11 --- node_modules/sax/test/cdata-end-split.js | 15 ---- node_modules/sax/test/cdata-fake-end.js | 28 ------- node_modules/sax/test/cdata-multiple.js | 15 ---- node_modules/sax/test/cdata.js | 10 --- node_modules/sax/test/cyrillic.js | 8 -- node_modules/sax/test/duplicate-attribute.js | 13 ---- node_modules/sax/test/emoji.js | 12 --- node_modules/sax/test/end_empty_stream.js | 5 -- node_modules/sax/test/entities.js | 10 --- node_modules/sax/test/entity-mega.js | 16 ---- node_modules/sax/test/flush.js | 13 ---- node_modules/sax/test/index.js | 86 ---------------------- node_modules/sax/test/issue-23.js | 43 ----------- node_modules/sax/test/issue-30.js | 24 ------ node_modules/sax/test/issue-35.js | 15 ---- node_modules/sax/test/issue-47.js | 12 --- node_modules/sax/test/issue-49.js | 31 -------- node_modules/sax/test/issue-84.js | 13 ---- node_modules/sax/test/parser-position.js | 28 ------- node_modules/sax/test/script-close-better.js | 12 --- node_modules/sax/test/script.js | 12 --- node_modules/sax/test/self-closing-child-strict.js | 44 ----------- node_modules/sax/test/self-closing-child.js | 44 ----------- node_modules/sax/test/self-closing-tag.js | 25 ------- node_modules/sax/test/stray-ending.js | 17 ----- .../sax/test/trailing-attribute-no-value.js | 10 --- node_modules/sax/test/trailing-non-whitespace.js | 18 ----- node_modules/sax/test/unclosed-root.js | 11 --- node_modules/sax/test/unquoted.js | 18 ----- node_modules/sax/test/utf8-split.js | 32 -------- node_modules/sax/test/xmlns-as-tag-name.js | 15 ---- node_modules/sax/test/xmlns-issue-41.js | 68 ----------------- node_modules/sax/test/xmlns-rebinding.js | 63 ---------------- node_modules/sax/test/xmlns-strict.js | 74 ------------------- node_modules/sax/test/xmlns-unbound-element.js | 33 --------- node_modules/sax/test/xmlns-unbound.js | 15 ---- node_modules/sax/test/xmlns-xml-default-ns.js | 31 -------- .../sax/test/xmlns-xml-default-prefix-attribute.js | 36 --------- node_modules/sax/test/xmlns-xml-default-prefix.js | 21 ------ .../sax/test/xmlns-xml-default-redefine.js | 41 ----------- 45 files changed, 1232 deletions(-) delete mode 100644 node_modules/sax/test/attribute-name.js delete mode 100644 node_modules/sax/test/attribute-no-space.js delete mode 100644 node_modules/sax/test/buffer-overrun.js delete mode 100644 node_modules/sax/test/case.js delete mode 100644 node_modules/sax/test/cdata-chunked.js delete mode 100644 node_modules/sax/test/cdata-end-split.js delete mode 100644 node_modules/sax/test/cdata-fake-end.js delete mode 100644 node_modules/sax/test/cdata-multiple.js delete mode 100644 node_modules/sax/test/cdata.js delete mode 100644 node_modules/sax/test/cyrillic.js delete mode 100644 node_modules/sax/test/duplicate-attribute.js delete mode 100644 node_modules/sax/test/emoji.js delete mode 100644 node_modules/sax/test/end_empty_stream.js delete mode 100644 node_modules/sax/test/entities.js delete mode 100644 node_modules/sax/test/entity-mega.js delete mode 100644 node_modules/sax/test/flush.js delete mode 100644 node_modules/sax/test/index.js delete mode 100644 node_modules/sax/test/issue-23.js delete mode 100644 node_modules/sax/test/issue-30.js delete mode 100644 node_modules/sax/test/issue-35.js delete mode 100644 node_modules/sax/test/issue-47.js delete mode 100644 node_modules/sax/test/issue-49.js delete mode 100644 node_modules/sax/test/issue-84.js delete mode 100644 node_modules/sax/test/parser-position.js delete mode 100644 node_modules/sax/test/script-close-better.js delete mode 100644 node_modules/sax/test/script.js delete mode 100644 node_modules/sax/test/self-closing-child-strict.js delete mode 100644 node_modules/sax/test/self-closing-child.js delete mode 100644 node_modules/sax/test/self-closing-tag.js delete mode 100644 node_modules/sax/test/stray-ending.js delete mode 100644 node_modules/sax/test/trailing-attribute-no-value.js delete mode 100644 node_modules/sax/test/trailing-non-whitespace.js delete mode 100644 node_modules/sax/test/unclosed-root.js delete mode 100644 node_modules/sax/test/unquoted.js delete mode 100644 node_modules/sax/test/utf8-split.js delete mode 100644 node_modules/sax/test/xmlns-as-tag-name.js delete mode 100644 node_modules/sax/test/xmlns-issue-41.js delete mode 100644 node_modules/sax/test/xmlns-rebinding.js delete mode 100644 node_modules/sax/test/xmlns-strict.js delete mode 100644 node_modules/sax/test/xmlns-unbound-element.js delete mode 100644 node_modules/sax/test/xmlns-unbound.js delete mode 100644 node_modules/sax/test/xmlns-xml-default-ns.js delete mode 100644 node_modules/sax/test/xmlns-xml-default-prefix-attribute.js delete mode 100644 node_modules/sax/test/xmlns-xml-default-prefix.js delete mode 100644 node_modules/sax/test/xmlns-xml-default-redefine.js (limited to 'node_modules/sax/test') diff --git a/node_modules/sax/test/attribute-name.js b/node_modules/sax/test/attribute-name.js deleted file mode 100644 index 9ebbe58e7..000000000 --- a/node_modules/sax/test/attribute-name.js +++ /dev/null @@ -1,33 +0,0 @@ -require(__dirname).test( - { xml: "" - , expect: [ - ["attribute", { - name: "length" - , value: "12345" - , prefix: "" - , local: "length" - , uri: "" - }] - , ["opentag", { - name: "root" - , prefix: "" - , local: "root" - , uri: "" - , attributes: { - length: { - name: "length" - , value: "12345" - , prefix: "" - , local: "length" - , uri: "" - } - } - , ns: {} - , isSelfClosing: false - }] - , ["closetag", "root"] - ] - , strict: true - , opt: { xmlns: true } - } -) diff --git a/node_modules/sax/test/attribute-no-space.js b/node_modules/sax/test/attribute-no-space.js deleted file mode 100644 index fe9aa465a..000000000 --- a/node_modules/sax/test/attribute-no-space.js +++ /dev/null @@ -1,75 +0,0 @@ -// non-strict: no error -require(__dirname).test - ( { xml : '' - - , expect : - [ [ "attribute", { name: 'attr1', value: 'first' } ] - , [ "attribute", { name: 'attr2', value: 'second' } ] - , [ "opentag", { name: "root", attributes: {attr1: 'first', attr2: 'second'}, isSelfClosing: true } ] - , [ "closetag", "root" ] - ] - , strict : false - , opt : { lowercase: true } - } - ) - -// strict: should give an error, but still parse -require(__dirname).test - ( { xml : '' - - , expect : - [ [ "attribute", { name: 'attr1', value: 'first' } ] - , [ "error", "No whitespace between attributes\nLine: 0\nColumn: 20\nChar: a" ] - , [ "attribute", { name: 'attr2', value: 'second' } ] - , [ "opentag", { name: "root", attributes: {attr1: 'first', attr2: 'second'}, isSelfClosing: true } ] - , [ "closetag", "root" ] - ] - , strict : true - , opt : { } - } - ) - -// strict: other cases should still pass -require(__dirname).test - ( { xml : '' - - , expect : - [ [ "attribute", { name: 'attr1', value: 'first' } ] - , [ "attribute", { name: 'attr2', value: 'second' } ] - , [ "opentag", { name: "root", attributes: {attr1: 'first', attr2: 'second'}, isSelfClosing: true } ] - , [ "closetag", "root" ] - ] - , strict : true - , opt : { } - } - ) - -// strict: other cases should still pass -require(__dirname).test - ( { xml : '' - - , expect : - [ [ "attribute", { name: 'attr1', value: 'first' } ] - , [ "attribute", { name: 'attr2', value: 'second' } ] - , [ "opentag", { name: "root", attributes: {attr1: 'first', attr2: 'second'}, isSelfClosing: true } ] - , [ "closetag", "root" ] - ] - , strict : true - , opt : { } - } - ) - -// strict: other cases should still pass -require(__dirname).test - ( { xml : '' - - , expect : - [ [ "attribute", { name: 'attr1', value: 'first' } ] - , [ "attribute", { name: 'attr2', value: 'second' } ] - , [ "opentag", { name: "root", attributes: {attr1: 'first', attr2: 'second'}, isSelfClosing: true } ] - , [ "closetag", "root" ] - ] - , strict : true - , opt : { } - } - ) diff --git a/node_modules/sax/test/buffer-overrun.js b/node_modules/sax/test/buffer-overrun.js deleted file mode 100644 index 57d3c41fa..000000000 --- a/node_modules/sax/test/buffer-overrun.js +++ /dev/null @@ -1,26 +0,0 @@ -// set this really low so that I don't have to put 64 MB of xml in here. -var sax = require("../lib/sax") -var bl = sax.MAX_BUFFER_LENGTH -sax.MAX_BUFFER_LENGTH = 5; - -require(__dirname).test({ - expect : [ - ["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 15\nChar: "], - ["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 30\nChar: "], - ["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 45\nChar: "], - ["opentag", { - "name": "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", - "attributes": {}, - "isSelfClosing": false - }], - ["text", "yo"], - ["closetag", "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"] - ] -}).write("") - .write("yo") - .write("") - .close(); -sax.MAX_BUFFER_LENGTH = bl diff --git a/node_modules/sax/test/case.js b/node_modules/sax/test/case.js deleted file mode 100644 index 9da78aba4..000000000 --- a/node_modules/sax/test/case.js +++ /dev/null @@ -1,50 +0,0 @@ -// default to uppercase -require(__dirname).test - ( { xml : - "" - , expect : - [ [ "attribute", { name: "CLASS", value: "test" } ] - , [ "attribute", { name: "HELLO", value: "world" } ] - , [ "opentag", { name: "SPAN", - attributes: { CLASS: "test", HELLO: "world" }, - isSelfClosing: false } ] - , [ "closetag", "SPAN" ] - ] - , strict : false - , opt : {} - } - ) - -// lowercase option : lowercase tag/attribute names -require(__dirname).test - ( { xml : - "" - , expect : - [ [ "attribute", { name: "class", value: "test" } ] - , [ "attribute", { name: "hello", value: "world" } ] - , [ "opentag", { name: "span", - attributes: { class: "test", hello: "world" }, - isSelfClosing: false } ] - , [ "closetag", "span" ] - ] - , strict : false - , opt : {lowercase:true} - } - ) - -// backward compatibility with old lowercasetags opt -require(__dirname).test - ( { xml : - "" - , expect : - [ [ "attribute", { name: "class", value: "test" } ] - , [ "attribute", { name: "hello", value: "world" } ] - , [ "opentag", { name: "span", - attributes: { class: "test", hello: "world" }, - isSelfClosing: false } ] - , [ "closetag", "span" ] - ] - , strict : false - , opt : {lowercasetags:true} - } - ) diff --git a/node_modules/sax/test/cdata-chunked.js b/node_modules/sax/test/cdata-chunked.js deleted file mode 100644 index e3362bc8d..000000000 --- a/node_modules/sax/test/cdata-chunked.js +++ /dev/null @@ -1,11 +0,0 @@ - -require(__dirname).test({ - expect : [ - ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}], - ["opencdata", undefined], - ["cdata", " this is character data  "], - ["closecdata", undefined], - ["closetag", "R"] - ] -}).write("").close(); - diff --git a/node_modules/sax/test/cdata-end-split.js b/node_modules/sax/test/cdata-end-split.js deleted file mode 100644 index 34f34500d..000000000 --- a/node_modules/sax/test/cdata-end-split.js +++ /dev/null @@ -1,15 +0,0 @@ - -require(__dirname).test({ - expect : [ - ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}], - ["opencdata", undefined], - ["cdata", " this is "], - ["closecdata", undefined], - ["closetag", "R"] - ] -}) - .write("") - .write("") - .close(); - diff --git a/node_modules/sax/test/cdata-fake-end.js b/node_modules/sax/test/cdata-fake-end.js deleted file mode 100644 index ccafa1b91..000000000 --- a/node_modules/sax/test/cdata-fake-end.js +++ /dev/null @@ -1,28 +0,0 @@ - -var p = require(__dirname).test({ - expect : [ - ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}], - ["opencdata", undefined], - ["cdata", "[[[[[[[[]]]]]]]]"], - ["closecdata", undefined], - ["closetag", "R"] - ] -}) -var x = "" -for (var i = 0; i < x.length ; i ++) { - p.write(x.charAt(i)) -} -p.close(); - - -var p2 = require(__dirname).test({ - expect : [ - ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}], - ["opencdata", undefined], - ["cdata", "[[[[[[[[]]]]]]]]"], - ["closecdata", undefined], - ["closetag", "R"] - ] -}) -var x = "" -p2.write(x).close(); diff --git a/node_modules/sax/test/cdata-multiple.js b/node_modules/sax/test/cdata-multiple.js deleted file mode 100644 index 8e2f9112b..000000000 --- a/node_modules/sax/test/cdata-multiple.js +++ /dev/null @@ -1,15 +0,0 @@ - -require(__dirname).test({ - expect : [ - ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}], - ["opencdata", undefined], - ["cdata", " this is "], - ["closecdata", undefined], - ["opencdata", undefined], - ["cdata", "character data  "], - ["closecdata", undefined], - ["closetag", "R"] - ] -}).write("").write("").close(); - diff --git a/node_modules/sax/test/cdata.js b/node_modules/sax/test/cdata.js deleted file mode 100644 index 31a8a304f..000000000 --- a/node_modules/sax/test/cdata.js +++ /dev/null @@ -1,10 +0,0 @@ -require(__dirname).test({ - xml : "", - expect : [ - ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}], - ["opencdata", undefined], - ["cdata", " this is character data  "], - ["closecdata", undefined], - ["closetag", "R"] - ] -}); diff --git a/node_modules/sax/test/cyrillic.js b/node_modules/sax/test/cyrillic.js deleted file mode 100644 index f05dd1b23..000000000 --- a/node_modules/sax/test/cyrillic.js +++ /dev/null @@ -1,8 +0,0 @@ -require(__dirname).test({ - xml: '<Р>тест', - expect: [ - ['opentag', {'name':'Р', attributes:{}, isSelfClosing: false}], - ['text', 'тест'], - ['closetag', 'Р'] - ] -}); diff --git a/node_modules/sax/test/duplicate-attribute.js b/node_modules/sax/test/duplicate-attribute.js deleted file mode 100644 index a21eb4191..000000000 --- a/node_modules/sax/test/duplicate-attribute.js +++ /dev/null @@ -1,13 +0,0 @@ -require(__dirname).test - ( { xml : - "" - , expect : - [ [ "attribute", { name: "ID", value: "hello" } ] - , [ "opentag", { name: "SPAN", - attributes: { ID: "hello" }, isSelfClosing: false } ] - , [ "closetag", "SPAN" ] - ] - , strict : false - , opt : {} - } - ) diff --git a/node_modules/sax/test/emoji.js b/node_modules/sax/test/emoji.js deleted file mode 100644 index aa63a21ed..000000000 --- a/node_modules/sax/test/emoji.js +++ /dev/null @@ -1,12 +0,0 @@ -// split high-order numeric attributes into surrogate pairs -require(__dirname).test - ( { xml : '🔥' - , expect : - [ [ 'opentag', { name: 'A', attributes: {}, isSelfClosing: false } ] - , [ 'text', '\ud83d\udd25' ] - , [ 'closetag', 'A' ] - ] - , strict : false - , opt : {} - } - ) diff --git a/node_modules/sax/test/end_empty_stream.js b/node_modules/sax/test/end_empty_stream.js deleted file mode 100644 index f01cc8430..000000000 --- a/node_modules/sax/test/end_empty_stream.js +++ /dev/null @@ -1,5 +0,0 @@ -var assert = require('assert'); -var saxStream = require('../lib/sax').createStream(); -assert.doesNotThrow(function() { - saxStream.end(); -}); diff --git a/node_modules/sax/test/entities.js b/node_modules/sax/test/entities.js deleted file mode 100644 index 490166785..000000000 --- a/node_modules/sax/test/entities.js +++ /dev/null @@ -1,10 +0,0 @@ -require(__dirname).test({ - xml: '⌋ ' + - '♠ © → & ' + - '< < < < < > ℜ ℘ €', - expect: [ - ['opentag', {'name':'R', attributes:{}, isSelfClosing: false}], - ['text', '⌋ ♠ © → & < < < < < > ℜ ℘ €'], - ['closetag', 'R'] - ] -}); diff --git a/node_modules/sax/test/entity-mega.js b/node_modules/sax/test/entity-mega.js deleted file mode 100644 index 4759a0224..000000000 --- a/node_modules/sax/test/entity-mega.js +++ /dev/null @@ -1,16 +0,0 @@ -var sax = require('../'); -var xml = ''; -var text = ''; -for (var i in sax.ENTITIES) { - xml += '&' + i + ';' - text += sax.ENTITIES[i] -} -xml += '' -require(__dirname).test({ - xml: xml, - expect: [ - ['opentag', {'name':'R', attributes:{}, isSelfClosing: false}], - ['text', text], - ['closetag', 'R'] - ] -}); diff --git a/node_modules/sax/test/flush.js b/node_modules/sax/test/flush.js deleted file mode 100644 index 20f15e02e..000000000 --- a/node_modules/sax/test/flush.js +++ /dev/null @@ -1,13 +0,0 @@ -var parser = require(__dirname).test({ - expect: [ - ['opentag', {'name':'T', attributes:{}, isSelfClosing: false}], - ['text', 'flush'], - ['text', 'rest'], - ['closetag', 'T'], - ] -}); - -parser.write('flush'); -parser.flush(); -parser.write('rest'); -parser.close(); diff --git a/node_modules/sax/test/index.js b/node_modules/sax/test/index.js deleted file mode 100644 index d4e1ef4f9..000000000 --- a/node_modules/sax/test/index.js +++ /dev/null @@ -1,86 +0,0 @@ -var globalsBefore = JSON.stringify(Object.keys(global)) - , util = require("util") - , assert = require("assert") - , fs = require("fs") - , path = require("path") - , sax = require("../lib/sax") - -exports.sax = sax - -// handy way to do simple unit tests -// if the options contains an xml string, it'll be written and the parser closed. -// otherwise, it's assumed that the test will write and close. -exports.test = function test (options) { - var xml = options.xml - , parser = sax.parser(options.strict, options.opt) - , expect = options.expect - , e = 0 - sax.EVENTS.forEach(function (ev) { - parser["on" + ev] = function (n) { - if (process.env.DEBUG) { - console.error({ expect: expect[e] - , actual: [ev, n] }) - } - if (e >= expect.length && (ev === "end" || ev === "ready")) return - assert.ok( e < expect.length, - "expectation #"+e+" "+util.inspect(expect[e])+"\n"+ - "Unexpected event: "+ev+" "+(n ? util.inspect(n) : "")) - var inspected = n instanceof Error ? "\n"+ n.message : util.inspect(n) - assert.equal(ev, expect[e][0], - "expectation #"+e+"\n"+ - "Didn't get expected event\n"+ - "expect: "+expect[e][0] + " " +util.inspect(expect[e][1])+"\n"+ - "actual: "+ev+" "+inspected+"\n") - if (ev === "error") assert.equal(n.message, expect[e][1]) - else assert.deepEqual(n, expect[e][1], - "expectation #"+e+"\n"+ - "Didn't get expected argument\n"+ - "expect: "+expect[e][0] + " " +util.inspect(expect[e][1])+"\n"+ - "actual: "+ev+" "+inspected+"\n") - e++ - if (ev === "error") parser.resume() - } - }) - if (xml) parser.write(xml).close() - return parser -} - -if (module === require.main) { - var running = true - , failures = 0 - - function fail (file, er) { - util.error("Failed: "+file) - util.error(er.stack || er.message) - failures ++ - } - - fs.readdir(__dirname, function (error, files) { - files = files.filter(function (file) { - return (/\.js$/.exec(file) && file !== 'index.js') - }) - var n = files.length - , i = 0 - console.log("0.." + n) - files.forEach(function (file) { - // run this test. - try { - require(path.resolve(__dirname, file)) - var globalsAfter = JSON.stringify(Object.keys(global)) - if (globalsAfter !== globalsBefore) { - var er = new Error("new globals introduced\n"+ - "expected: "+globalsBefore+"\n"+ - "actual: "+globalsAfter) - globalsBefore = globalsAfter - throw er - } - console.log("ok " + (++i) + " - " + file) - } catch (er) { - console.log("not ok "+ (++i) + " - " + file) - fail(file, er) - } - }) - if (!failures) return console.log("#all pass") - else return console.error(failures + " failure" + (failures > 1 ? "s" : "")) - }) -} diff --git a/node_modules/sax/test/issue-23.js b/node_modules/sax/test/issue-23.js deleted file mode 100644 index ccbdc3512..000000000 --- a/node_modules/sax/test/issue-23.js +++ /dev/null @@ -1,43 +0,0 @@ - -require(__dirname).test - ( { xml : - ""+ - ""+ - "653724009"+ - "-1"+ - "01pG0000002KoSUIA0"+ - "-1"+ - "CalendarController"+ - "true"+ - ""+ - "" - - , expect : - [ [ "opentag", { name: "COMPILECLASSESRESPONSE", attributes: {}, isSelfClosing: false } ] - , [ "opentag", { name : "RESULT", attributes: {}, isSelfClosing: false } ] - , [ "opentag", { name: "BODYCRC", attributes: {}, isSelfClosing: false } ] - , [ "text", "653724009" ] - , [ "closetag", "BODYCRC" ] - , [ "opentag", { name: "COLUMN", attributes: {}, isSelfClosing: false } ] - , [ "text", "-1" ] - , [ "closetag", "COLUMN" ] - , [ "opentag", { name: "ID", attributes: {}, isSelfClosing: false } ] - , [ "text", "01pG0000002KoSUIA0" ] - , [ "closetag", "ID" ] - , [ "opentag", {name: "LINE", attributes: {}, isSelfClosing: false } ] - , [ "text", "-1" ] - , [ "closetag", "LINE" ] - , [ "opentag", {name: "NAME", attributes: {}, isSelfClosing: false } ] - , [ "text", "CalendarController" ] - , [ "closetag", "NAME" ] - , [ "opentag", {name: "SUCCESS", attributes: {}, isSelfClosing: false } ] - , [ "text", "true" ] - , [ "closetag", "SUCCESS" ] - , [ "closetag", "RESULT" ] - , [ "closetag", "COMPILECLASSESRESPONSE" ] - ] - , strict : false - , opt : {} - } - ) - diff --git a/node_modules/sax/test/issue-30.js b/node_modules/sax/test/issue-30.js deleted file mode 100644 index 771b14e92..000000000 --- a/node_modules/sax/test/issue-30.js +++ /dev/null @@ -1,24 +0,0 @@ -// https://github.com/isaacs/sax-js/issues/33 -require(__dirname).test - ( { xml : "\n"+ - "\n"+ - "\n"+ - "" - - , expect : - [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ] - , [ "text", "\n" ] - , [ "comment", " \n comment with a single dash- in it\n" ] - , [ "text", "\n" ] - , [ "opentag", { name: "data", attributes: {}, isSelfClosing: true } ] - , [ "closetag", "data" ] - , [ "text", "\n" ] - , [ "closetag", "xml" ] - ] - , strict : true - , opt : {} - } - ) - diff --git a/node_modules/sax/test/issue-35.js b/node_modules/sax/test/issue-35.js deleted file mode 100644 index 64d67b3f6..000000000 --- a/node_modules/sax/test/issue-35.js +++ /dev/null @@ -1,15 +0,0 @@ -// https://github.com/isaacs/sax-js/issues/35 -require(__dirname).test - ( { xml : " \n"+ - "" - - , expect : - [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ] - , [ "text", "\r\r\n" ] - , [ "closetag", "xml" ] - ] - , strict : true - , opt : {} - } - ) - diff --git a/node_modules/sax/test/issue-47.js b/node_modules/sax/test/issue-47.js deleted file mode 100644 index 661584ab1..000000000 --- a/node_modules/sax/test/issue-47.js +++ /dev/null @@ -1,12 +0,0 @@ -// https://github.com/isaacs/sax-js/issues/47 -require(__dirname).test - ( { xml : '' - , expect : [ - [ "attribute", { name:'HREF', value:"query.svc?x=1&y=2&z=3"} ], - [ "opentag", { name: "A", attributes: { HREF:"query.svc?x=1&y=2&z=3"}, isSelfClosing: true } ], - [ "closetag", "A" ] - ] - , opt : {} - } - ) - diff --git a/node_modules/sax/test/issue-49.js b/node_modules/sax/test/issue-49.js deleted file mode 100644 index ff2fbf750..000000000 --- a/node_modules/sax/test/issue-49.js +++ /dev/null @@ -1,31 +0,0 @@ -// https://github.com/isaacs/sax-js/issues/49 -require(__dirname).test - ( { xml : "" - , expect : - [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ] - , [ "opentag", { name: "script", attributes: {}, isSelfClosing: false } ] - , [ "text", "hello world" ] - , [ "closetag", "script" ] - , [ "closetag", "xml" ] - ] - , strict : false - , opt : { lowercasetags: true, noscript: true } - } - ) - -require(__dirname).test - ( { xml : "" - , expect : - [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ] - , [ "opentag", { name: "script", attributes: {}, isSelfClosing: false } ] - , [ "opencdata", undefined ] - , [ "cdata", "hello world" ] - , [ "closecdata", undefined ] - , [ "closetag", "script" ] - , [ "closetag", "xml" ] - ] - , strict : false - , opt : { lowercasetags: true, noscript: true } - } - ) - diff --git a/node_modules/sax/test/issue-84.js b/node_modules/sax/test/issue-84.js deleted file mode 100644 index 0e7ee699a..000000000 --- a/node_modules/sax/test/issue-84.js +++ /dev/null @@ -1,13 +0,0 @@ -// https://github.com/isaacs/sax-js/issues/49 -require(__dirname).test - ( { xml : "body" - , expect : - [ [ "processinginstruction", { name: "has", body: "unbalanced \"quotes" } ], - [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ] - , [ "text", "body" ] - , [ "closetag", "xml" ] - ] - , strict : false - , opt : { lowercasetags: true, noscript: true } - } - ) diff --git a/node_modules/sax/test/parser-position.js b/node_modules/sax/test/parser-position.js deleted file mode 100644 index e4a68b1e9..000000000 --- a/node_modules/sax/test/parser-position.js +++ /dev/null @@ -1,28 +0,0 @@ -var sax = require("../lib/sax"), - assert = require("assert") - -function testPosition(chunks, expectedEvents) { - var parser = sax.parser(); - expectedEvents.forEach(function(expectation) { - parser['on' + expectation[0]] = function() { - for (var prop in expectation[1]) { - assert.equal(parser[prop], expectation[1][prop]); - } - } - }); - chunks.forEach(function(chunk) { - parser.write(chunk); - }); -}; - -testPosition(['
abcdefgh
'], - [ ['opentag', { position: 5, startTagPosition: 1 }] - , ['text', { position: 19, startTagPosition: 14 }] - , ['closetag', { position: 19, startTagPosition: 14 }] - ]); - -testPosition(['
abcde','fgh
'], - [ ['opentag', { position: 5, startTagPosition: 1 }] - , ['text', { position: 19, startTagPosition: 14 }] - , ['closetag', { position: 19, startTagPosition: 14 }] - ]); diff --git a/node_modules/sax/test/script-close-better.js b/node_modules/sax/test/script-close-better.js deleted file mode 100644 index f4887b9a0..000000000 --- a/node_modules/sax/test/script-close-better.js +++ /dev/null @@ -1,12 +0,0 @@ -require(__dirname).test({ - xml : "", - expect : [ - ["opentag", {"name": "HTML","attributes": {}, isSelfClosing: false}], - ["opentag", {"name": "HEAD","attributes": {}, isSelfClosing: false}], - ["opentag", {"name": "SCRIPT","attributes": {}, isSelfClosing: false}], - ["script", "'
foo
", - expect : [ - ["opentag", {"name": "HTML","attributes": {}, "isSelfClosing": false}], - ["opentag", {"name": "HEAD","attributes": {}, "isSelfClosing": false}], - ["opentag", {"name": "SCRIPT","attributes": {}, "isSelfClosing": false}], - ["script", "if (1 < 0) { console.log('elo there'); }"], - ["closetag", "SCRIPT"], - ["closetag", "HEAD"], - ["closetag", "HTML"] - ] -}); diff --git a/node_modules/sax/test/self-closing-child-strict.js b/node_modules/sax/test/self-closing-child-strict.js deleted file mode 100644 index 3d6e98520..000000000 --- a/node_modules/sax/test/self-closing-child-strict.js +++ /dev/null @@ -1,44 +0,0 @@ - -require(__dirname).test({ - xml : - ""+ - "" + - "" + - "" + - "" + - "=(|)" + - "" + - "", - expect : [ - ["opentag", { - "name": "root", - "attributes": {}, - "isSelfClosing": false - }], - ["opentag", { - "name": "child", - "attributes": {}, - "isSelfClosing": false - }], - ["opentag", { - "name": "haha", - "attributes": {}, - "isSelfClosing": true - }], - ["closetag", "haha"], - ["closetag", "child"], - ["opentag", { - "name": "monkey", - "attributes": {}, - "isSelfClosing": false - }], - ["text", "=(|)"], - ["closetag", "monkey"], - ["closetag", "root"], - ["end"], - ["ready"] - ], - strict : true, - opt : {} -}); - diff --git a/node_modules/sax/test/self-closing-child.js b/node_modules/sax/test/self-closing-child.js deleted file mode 100644 index f31c36646..000000000 --- a/node_modules/sax/test/self-closing-child.js +++ /dev/null @@ -1,44 +0,0 @@ - -require(__dirname).test({ - xml : - ""+ - "" + - "" + - "" + - "" + - "=(|)" + - "" + - "", - expect : [ - ["opentag", { - "name": "ROOT", - "attributes": {}, - "isSelfClosing": false - }], - ["opentag", { - "name": "CHILD", - "attributes": {}, - "isSelfClosing": false - }], - ["opentag", { - "name": "HAHA", - "attributes": {}, - "isSelfClosing": true - }], - ["closetag", "HAHA"], - ["closetag", "CHILD"], - ["opentag", { - "name": "MONKEY", - "attributes": {}, - "isSelfClosing": false - }], - ["text", "=(|)"], - ["closetag", "MONKEY"], - ["closetag", "ROOT"], - ["end"], - ["ready"] - ], - strict : false, - opt : {} -}); - diff --git a/node_modules/sax/test/self-closing-tag.js b/node_modules/sax/test/self-closing-tag.js deleted file mode 100644 index d1d8b7c82..000000000 --- a/node_modules/sax/test/self-closing-tag.js +++ /dev/null @@ -1,25 +0,0 @@ - -require(__dirname).test({ - xml : - " "+ - " "+ - " "+ - " "+ - "=(|) "+ - ""+ - " ", - expect : [ - ["opentag", {name:"ROOT", attributes:{}, isSelfClosing: false}], - ["opentag", {name:"HAHA", attributes:{}, isSelfClosing: true}], - ["closetag", "HAHA"], - ["opentag", {name:"HAHA", attributes:{}, isSelfClosing: true}], - ["closetag", "HAHA"], - // ["opentag", {name:"HAHA", attributes:{}}], - // ["closetag", "HAHA"], - ["opentag", {name:"MONKEY", attributes:{}, isSelfClosing: false}], - ["text", "=(|)"], - ["closetag", "MONKEY"], - ["closetag", "ROOT"] - ], - opt : { trim : true } -}); \ No newline at end of file diff --git a/node_modules/sax/test/stray-ending.js b/node_modules/sax/test/stray-ending.js deleted file mode 100644 index bec467b22..000000000 --- a/node_modules/sax/test/stray-ending.js +++ /dev/null @@ -1,17 +0,0 @@ -// stray ending tags should just be ignored in non-strict mode. -// https://github.com/isaacs/sax-js/issues/32 -require(__dirname).test - ( { xml : - "
" - , expect : - [ [ "opentag", { name: "A", attributes: {}, isSelfClosing: false } ] - , [ "opentag", { name: "B", attributes: {}, isSelfClosing: false } ] - , [ "text", "" ] - , [ "closetag", "B" ] - , [ "closetag", "A" ] - ] - , strict : false - , opt : {} - } - ) - diff --git a/node_modules/sax/test/trailing-attribute-no-value.js b/node_modules/sax/test/trailing-attribute-no-value.js deleted file mode 100644 index 222837f8f..000000000 --- a/node_modules/sax/test/trailing-attribute-no-value.js +++ /dev/null @@ -1,10 +0,0 @@ - -require(__dirname).test({ - xml : - "", - expect : [ - ["attribute", {name:"ATTRIB", value:"attrib"}], - ["opentag", {name:"ROOT", attributes:{"ATTRIB":"attrib"}, isSelfClosing: false}] - ], - opt : { trim : true } -}); diff --git a/node_modules/sax/test/trailing-non-whitespace.js b/node_modules/sax/test/trailing-non-whitespace.js deleted file mode 100644 index 619578b17..000000000 --- a/node_modules/sax/test/trailing-non-whitespace.js +++ /dev/null @@ -1,18 +0,0 @@ - -require(__dirname).test({ - xml : "Welcome, to monkey land", - expect : [ - ["opentag", { - "name": "SPAN", - "attributes": {}, - isSelfClosing: false - }], - ["text", "Welcome,"], - ["closetag", "SPAN"], - ["text", " to monkey land"], - ["end"], - ["ready"] - ], - strict : false, - opt : {} -}); diff --git a/node_modules/sax/test/unclosed-root.js b/node_modules/sax/test/unclosed-root.js deleted file mode 100644 index f4eeac61b..000000000 --- a/node_modules/sax/test/unclosed-root.js +++ /dev/null @@ -1,11 +0,0 @@ -require(__dirname).test - ( { xml : "" - - , expect : - [ [ "opentag", { name: "root", attributes: {}, isSelfClosing: false } ] - , [ "error", "Unclosed root tag\nLine: 0\nColumn: 6\nChar: " ] - ] - , strict : true - , opt : {} - } - ) diff --git a/node_modules/sax/test/unquoted.js b/node_modules/sax/test/unquoted.js deleted file mode 100644 index b3a9a8122..000000000 --- a/node_modules/sax/test/unquoted.js +++ /dev/null @@ -1,18 +0,0 @@ -// unquoted attributes should be ok in non-strict mode -// https://github.com/isaacs/sax-js/issues/31 -require(__dirname).test - ( { xml : - "" - , expect : - [ [ "attribute", { name: "CLASS", value: "test" } ] - , [ "attribute", { name: "HELLO", value: "world" } ] - , [ "opentag", { name: "SPAN", - attributes: { CLASS: "test", HELLO: "world" }, - isSelfClosing: false } ] - , [ "closetag", "SPAN" ] - ] - , strict : false - , opt : {} - } - ) - diff --git a/node_modules/sax/test/utf8-split.js b/node_modules/sax/test/utf8-split.js deleted file mode 100644 index e22bc1004..000000000 --- a/node_modules/sax/test/utf8-split.js +++ /dev/null @@ -1,32 +0,0 @@ -var assert = require('assert') -var saxStream = require('../lib/sax').createStream() - -var b = new Buffer('误') - -saxStream.on('text', function(text) { - assert.equal(text, b.toString()) -}) - -saxStream.write(new Buffer('')) -saxStream.write(b.slice(0, 1)) -saxStream.write(b.slice(1)) -saxStream.write(new Buffer('')) -saxStream.write(b.slice(0, 2)) -saxStream.write(b.slice(2)) -saxStream.write(new Buffer('')) -saxStream.write(b) -saxStream.write(new Buffer('')) -saxStream.write(Buffer.concat([new Buffer(''), b.slice(0, 1)])) -saxStream.end(Buffer.concat([b.slice(1), new Buffer('')])) - -var saxStream2 = require('../lib/sax').createStream() - -saxStream2.on('text', function(text) { - assert.equal(text, '�') -}); - -saxStream2.write(new Buffer('')); -saxStream2.write(new Buffer([0xC0])); -saxStream2.write(new Buffer('')); -saxStream2.write(Buffer.concat([new Buffer(''), b.slice(0,1)])); -saxStream2.end(); diff --git a/node_modules/sax/test/xmlns-as-tag-name.js b/node_modules/sax/test/xmlns-as-tag-name.js deleted file mode 100644 index 99142ca69..000000000 --- a/node_modules/sax/test/xmlns-as-tag-name.js +++ /dev/null @@ -1,15 +0,0 @@ - -require(__dirname).test - ( { xml : - "" - , expect : - [ [ "opentag", { name: "xmlns", uri: "", prefix: "", local: "xmlns", - attributes: {}, ns: {}, - isSelfClosing: true} - ], - ["closetag", "xmlns"] - ] - , strict : true - , opt : { xmlns: true } - } - ); diff --git a/node_modules/sax/test/xmlns-issue-41.js b/node_modules/sax/test/xmlns-issue-41.js deleted file mode 100644 index 17ab45a0f..000000000 --- a/node_modules/sax/test/xmlns-issue-41.js +++ /dev/null @@ -1,68 +0,0 @@ -var t = require(__dirname) - - , xmls = // should be the same both ways. - [ "" - , "" ] - - , ex1 = - [ [ "opennamespace" - , { prefix: "a" - , uri: "http://ATTRIBUTE" - } - ] - , [ "attribute" - , { name: "xmlns:a" - , value: "http://ATTRIBUTE" - , prefix: "xmlns" - , local: "a" - , uri: "http://www.w3.org/2000/xmlns/" - } - ] - , [ "attribute" - , { name: "a:attr" - , local: "attr" - , prefix: "a" - , uri: "http://ATTRIBUTE" - , value: "value" - } - ] - , [ "opentag" - , { name: "parent" - , uri: "" - , prefix: "" - , local: "parent" - , attributes: - { "a:attr": - { name: "a:attr" - , local: "attr" - , prefix: "a" - , uri: "http://ATTRIBUTE" - , value: "value" - } - , "xmlns:a": - { name: "xmlns:a" - , local: "a" - , prefix: "xmlns" - , uri: "http://www.w3.org/2000/xmlns/" - , value: "http://ATTRIBUTE" - } - } - , ns: {"a": "http://ATTRIBUTE"} - , isSelfClosing: true - } - ] - , ["closetag", "parent"] - , ["closenamespace", { prefix: "a", uri: "http://ATTRIBUTE" }] - ] - - // swap the order of elements 2 and 1 - , ex2 = [ex1[0], ex1[2], ex1[1]].concat(ex1.slice(3)) - , expected = [ex1, ex2] - -xmls.forEach(function (x, i) { - t.test({ xml: x - , expect: expected[i] - , strict: true - , opt: { xmlns: true } - }) -}) diff --git a/node_modules/sax/test/xmlns-rebinding.js b/node_modules/sax/test/xmlns-rebinding.js deleted file mode 100644 index 07e042553..000000000 --- a/node_modules/sax/test/xmlns-rebinding.js +++ /dev/null @@ -1,63 +0,0 @@ - -require(__dirname).test - ( { xml : - ""+ - ""+ - ""+ - ""+ - ""+ - "" - - , expect : - [ [ "opennamespace", { prefix: "x", uri: "x1" } ] - , [ "opennamespace", { prefix: "y", uri: "y1" } ] - , [ "attribute", { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ] - , [ "attribute", { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" } ] - , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ] - , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ] - , [ "opentag", { name: "root", uri: "", prefix: "", local: "root", - attributes: { "xmlns:x": { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } - , "xmlns:y": { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" } - , "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } - , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } }, - ns: { x: 'x1', y: 'y1' }, - isSelfClosing: false } ] - - , [ "opennamespace", { prefix: "x", uri: "x2" } ] - , [ "attribute", { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ] - , [ "opentag", { name: "rebind", uri: "", prefix: "", local: "rebind", - attributes: { "xmlns:x": { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } }, - ns: { x: 'x2' }, - isSelfClosing: false } ] - - , [ "attribute", { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" } ] - , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ] - , [ "opentag", { name: "check", uri: "", prefix: "", local: "check", - attributes: { "x:a": { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" } - , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } }, - ns: { x: 'x2' }, - isSelfClosing: true } ] - - , [ "closetag", "check" ] - - , [ "closetag", "rebind" ] - , [ "closenamespace", { prefix: "x", uri: "x2" } ] - - , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ] - , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ] - , [ "opentag", { name: "check", uri: "", prefix: "", local: "check", - attributes: { "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } - , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } }, - ns: { x: 'x1', y: 'y1' }, - isSelfClosing: true } ] - , [ "closetag", "check" ] - - , [ "closetag", "root" ] - , [ "closenamespace", { prefix: "x", uri: "x1" } ] - , [ "closenamespace", { prefix: "y", uri: "y1" } ] - ] - , strict : true - , opt : { xmlns: true } - } - ) - diff --git a/node_modules/sax/test/xmlns-strict.js b/node_modules/sax/test/xmlns-strict.js deleted file mode 100644 index b5e3e5188..000000000 --- a/node_modules/sax/test/xmlns-strict.js +++ /dev/null @@ -1,74 +0,0 @@ - -require(__dirname).test - ( { xml : - ""+ - ""+ - ""+ - ""+ - ""+ - ""+ - ""+ - ""+ - ""+ - "" - - , expect : - [ [ "opentag", { name: "root", prefix: "", local: "root", uri: "", - attributes: {}, ns: {}, isSelfClosing: false } ] - - , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ] - , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "", - attributes: { "attr": { name: "attr", value: "normal", uri: "", prefix: "", local: "attr", uri: "" } }, - ns: {}, isSelfClosing: true } ] - , [ "closetag", "plain" ] - - , [ "opennamespace", { prefix: "", uri: "uri:default" } ] - - , [ "attribute", { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } ] - , [ "opentag", { name: "ns1", prefix: "", local: "ns1", uri: "uri:default", - attributes: { "xmlns": { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } }, - ns: { "": "uri:default" }, isSelfClosing: false } ] - - , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ] - , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "uri:default", ns: { '': 'uri:default' }, - attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } }, - isSelfClosing: true } ] - , [ "closetag", "plain" ] - - , [ "closetag", "ns1" ] - - , [ "closenamespace", { prefix: "", uri: "uri:default" } ] - - , [ "opennamespace", { prefix: "a", uri: "uri:nsa" } ] - - , [ "attribute", { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } ] - - , [ "opentag", { name: "ns2", prefix: "", local: "ns2", uri: "", - attributes: { "xmlns:a": { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } }, - ns: { a: "uri:nsa" }, isSelfClosing: false } ] - - , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ] - , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "", - attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } }, - ns: { a: 'uri:nsa' }, - isSelfClosing: true } ] - , [ "closetag", "plain" ] - - , [ "attribute", { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } ] - , [ "opentag", { name: "a:ns", prefix: "a", local: "ns", uri: "uri:nsa", - attributes: { "a:attr": { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } }, - ns: { a: 'uri:nsa' }, - isSelfClosing: true } ] - , [ "closetag", "a:ns" ] - - , [ "closetag", "ns2" ] - - , [ "closenamespace", { prefix: "a", uri: "uri:nsa" } ] - - , [ "closetag", "root" ] - ] - , strict : true - , opt : { xmlns: true } - } - ) - diff --git a/node_modules/sax/test/xmlns-unbound-element.js b/node_modules/sax/test/xmlns-unbound-element.js deleted file mode 100644 index 9d031a2bd..000000000 --- a/node_modules/sax/test/xmlns-unbound-element.js +++ /dev/null @@ -1,33 +0,0 @@ -require(__dirname).test( - { strict : true - , opt : { xmlns: true } - , expect : - [ [ "error", "Unbound namespace prefix: \"unbound:root\"\nLine: 0\nColumn: 15\nChar: >"] - , [ "opentag", { name: "unbound:root", uri: "unbound", prefix: "unbound", local: "root" - , attributes: {}, ns: {}, isSelfClosing: true } ] - , [ "closetag", "unbound:root" ] - ] - } -).write(""); - -require(__dirname).test( - { strict : true - , opt : { xmlns: true } - , expect : - [ [ "opennamespace", { prefix: "unbound", uri: "someuri" } ] - , [ "attribute", { name: 'xmlns:unbound', value: 'someuri' - , prefix: 'xmlns', local: 'unbound' - , uri: 'http://www.w3.org/2000/xmlns/' } ] - , [ "opentag", { name: "unbound:root", uri: "someuri", prefix: "unbound", local: "root" - , attributes: { 'xmlns:unbound': { - name: 'xmlns:unbound' - , value: 'someuri' - , prefix: 'xmlns' - , local: 'unbound' - , uri: 'http://www.w3.org/2000/xmlns/' } } - , ns: { "unbound": "someuri" }, isSelfClosing: true } ] - , [ "closetag", "unbound:root" ] - , [ "closenamespace", { prefix: 'unbound', uri: 'someuri' }] - ] - } -).write(""); diff --git a/node_modules/sax/test/xmlns-unbound.js b/node_modules/sax/test/xmlns-unbound.js deleted file mode 100644 index b740e2612..000000000 --- a/node_modules/sax/test/xmlns-unbound.js +++ /dev/null @@ -1,15 +0,0 @@ - -require(__dirname).test( - { strict : true - , opt : { xmlns: true } - , expect : - [ ["error", "Unbound namespace prefix: \"unbound\"\nLine: 0\nColumn: 28\nChar: >"] - - , [ "attribute", { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } ] - , [ "opentag", { name: "root", uri: "", prefix: "", local: "root", - attributes: { "unbound:attr": { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } }, - ns: {}, isSelfClosing: true } ] - , [ "closetag", "root" ] - ] - } -).write("") diff --git a/node_modules/sax/test/xmlns-xml-default-ns.js b/node_modules/sax/test/xmlns-xml-default-ns.js deleted file mode 100644 index b1984d255..000000000 --- a/node_modules/sax/test/xmlns-xml-default-ns.js +++ /dev/null @@ -1,31 +0,0 @@ -var xmlns_attr = -{ - name: "xmlns", value: "http://foo", prefix: "xmlns", - local: "", uri : "http://www.w3.org/2000/xmlns/" -}; - -var attr_attr = -{ - name: "attr", value: "bar", prefix: "", - local : "attr", uri : "" -}; - - -require(__dirname).test - ( { xml : - "" - , expect : - [ [ "opennamespace", { prefix: "", uri: "http://foo" } ] - , [ "attribute", xmlns_attr ] - , [ "attribute", attr_attr ] - , [ "opentag", { name: "elm", prefix: "", local: "elm", uri : "http://foo", - ns : { "" : "http://foo" }, - attributes: { xmlns: xmlns_attr, attr: attr_attr }, - isSelfClosing: true } ] - , [ "closetag", "elm" ] - , [ "closenamespace", { prefix: "", uri: "http://foo"} ] - ] - , strict : true - , opt : {xmlns: true} - } - ) diff --git a/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js b/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js deleted file mode 100644 index e41f21875..000000000 --- a/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js +++ /dev/null @@ -1,36 +0,0 @@ -require(__dirname).test( - { xml : "" - , expect : - [ [ "attribute" - , { name: "xml:lang" - , local: "lang" - , prefix: "xml" - , uri: "http://www.w3.org/XML/1998/namespace" - , value: "en" - } - ] - , [ "opentag" - , { name: "root" - , uri: "" - , prefix: "" - , local: "root" - , attributes: - { "xml:lang": - { name: "xml:lang" - , local: "lang" - , prefix: "xml" - , uri: "http://www.w3.org/XML/1998/namespace" - , value: "en" - } - } - , ns: {} - , isSelfClosing: true - } - ] - , ["closetag", "root"] - ] - , strict : true - , opt : { xmlns: true } - } -) - diff --git a/node_modules/sax/test/xmlns-xml-default-prefix.js b/node_modules/sax/test/xmlns-xml-default-prefix.js deleted file mode 100644 index a85b4787f..000000000 --- a/node_modules/sax/test/xmlns-xml-default-prefix.js +++ /dev/null @@ -1,21 +0,0 @@ -require(__dirname).test( - { xml : "" - , expect : - [ - [ "opentag" - , { name: "xml:root" - , uri: "http://www.w3.org/XML/1998/namespace" - , prefix: "xml" - , local: "root" - , attributes: {} - , ns: {} - , isSelfClosing: true - } - ] - , ["closetag", "xml:root"] - ] - , strict : true - , opt : { xmlns: true } - } -) - diff --git a/node_modules/sax/test/xmlns-xml-default-redefine.js b/node_modules/sax/test/xmlns-xml-default-redefine.js deleted file mode 100644 index d35d5a0cb..000000000 --- a/node_modules/sax/test/xmlns-xml-default-redefine.js +++ /dev/null @@ -1,41 +0,0 @@ -require(__dirname).test( - { xml : "" - , expect : - [ ["error" - , "xml: prefix must be bound to http://www.w3.org/XML/1998/namespace\n" - + "Actual: ERROR\n" - + "Line: 0\nColumn: 27\nChar: '" - ] - , [ "attribute" - , { name: "xmlns:xml" - , local: "xml" - , prefix: "xmlns" - , uri: "http://www.w3.org/2000/xmlns/" - , value: "ERROR" - } - ] - , [ "opentag" - , { name: "xml:root" - , uri: "http://www.w3.org/XML/1998/namespace" - , prefix: "xml" - , local: "root" - , attributes: - { "xmlns:xml": - { name: "xmlns:xml" - , local: "xml" - , prefix: "xmlns" - , uri: "http://www.w3.org/2000/xmlns/" - , value: "ERROR" - } - } - , ns: {} - , isSelfClosing: true - } - ] - , ["closetag", "xml:root"] - ] - , strict : true - , opt : { xmlns: true } - } -) - -- cgit v1.2.3