You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-13 00:10:37 +02:00
All: Use Lerna to manage monorepo
This commit is contained in:
71
packages/fork-sax/test/xmlns-xml-default-ns.js
Normal file
71
packages/fork-sax/test/xmlns-xml-default-ns.js
Normal file
@ -0,0 +1,71 @@
|
||||
var xmlnsAttr = {
|
||||
name: 'xmlns',
|
||||
value: 'http://foo',
|
||||
prefix: 'xmlns',
|
||||
local: '',
|
||||
uri: 'http://www.w3.org/2000/xmlns/'
|
||||
}
|
||||
|
||||
var attrAttr = {
|
||||
name: 'attr',
|
||||
value: 'bar',
|
||||
prefix: '',
|
||||
local: 'attr',
|
||||
uri: ''
|
||||
}
|
||||
|
||||
require(__dirname).test({
|
||||
xml: "<elm xmlns='http://foo' attr='bar'/>",
|
||||
expect: [
|
||||
[
|
||||
'opentagstart',
|
||||
{
|
||||
name: 'elm',
|
||||
attributes: {},
|
||||
ns: {}
|
||||
}
|
||||
],
|
||||
[
|
||||
'opennamespace',
|
||||
{ prefix: '', uri: 'http://foo' }
|
||||
],
|
||||
[
|
||||
'attribute',
|
||||
xmlnsAttr
|
||||
],
|
||||
[
|
||||
'attribute',
|
||||
attrAttr
|
||||
],
|
||||
[
|
||||
'opentag',
|
||||
{
|
||||
name: 'elm',
|
||||
prefix: '',
|
||||
local: 'elm',
|
||||
uri: 'http://foo',
|
||||
ns: { '': 'http://foo' },
|
||||
attributes: {
|
||||
xmlns: xmlnsAttr,
|
||||
attr: attrAttr
|
||||
},
|
||||
isSelfClosing: true
|
||||
}
|
||||
],
|
||||
[
|
||||
'closetag',
|
||||
'elm'
|
||||
],
|
||||
[
|
||||
'closenamespace',
|
||||
{
|
||||
prefix: '',
|
||||
uri: 'http://foo'
|
||||
}
|
||||
]
|
||||
],
|
||||
strict: true,
|
||||
opt: {
|
||||
xmlns: true
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user