wallet-core/node_modules/sax/test/stray-ending.js

18 lines
476 B
JavaScript
Raw Normal View History

2016-11-03 01:33:53 +01:00
// stray ending tags should just be ignored in non-strict mode.
// https://github.com/isaacs/sax-js/issues/32
require(__dirname).test
( { xml :
"<a><b></c></b></a>"
, expect :
[ [ "opentag", { name: "A", attributes: {}, isSelfClosing: false } ]
, [ "opentag", { name: "B", attributes: {}, isSelfClosing: false } ]
, [ "text", "</c>" ]
, [ "closetag", "B" ]
, [ "closetag", "A" ]
]
, strict : false
, opt : {}
}
)