You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
All: Use Lerna to manage monorepo
This commit is contained in:
101
packages/fork-sax/test/xmlns-unbound-element.js
Normal file
101
packages/fork-sax/test/xmlns-unbound-element.js
Normal file
@ -0,0 +1,101 @@
|
||||
require(__dirname).test({
|
||||
strict: true,
|
||||
opt: { xmlns: true },
|
||||
expect: [
|
||||
[
|
||||
'opentagstart',
|
||||
{
|
||||
name: 'unbound:root',
|
||||
attributes: {},
|
||||
ns: {}
|
||||
}
|
||||
],
|
||||
[
|
||||
'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('<unbound:root/>')
|
||||
|
||||
require(__dirname).test({
|
||||
strict: true,
|
||||
opt: {
|
||||
xmlns: true
|
||||
},
|
||||
expect: [
|
||||
[
|
||||
'opentagstart',
|
||||
{
|
||||
name: 'unbound:root',
|
||||
attributes: {},
|
||||
ns: {}
|
||||
}
|
||||
],
|
||||
[
|
||||
'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('<unbound:root xmlns:unbound="someuri"/>')
|
Reference in New Issue
Block a user