335 lines
6.6 KiB
JSON
335 lines
6.6 KiB
JSON
{
|
|
"description": "Test in-text legacy `:=` and `::` annotation style with enabled links in values (#2153, `wgContLang=en`)",
|
|
"setup": [
|
|
{
|
|
"namespace": "SMW_NS_PROPERTY",
|
|
"page": "Has text",
|
|
"contents": "[[Has type::Text]]"
|
|
},
|
|
{
|
|
"namespace": "SMW_NS_PROPERTY",
|
|
"page": "Has page",
|
|
"contents": "[[Has type::Page]]"
|
|
},
|
|
{
|
|
"namespace": "SMW_NS_PROPERTY",
|
|
"page": "Has number",
|
|
"contents": "[[Has type::Number]]"
|
|
},
|
|
{
|
|
"namespace": "SMW_NS_PROPERTY",
|
|
"page": "Has date",
|
|
"contents": "[[Has type::Date]]"
|
|
},
|
|
{
|
|
"page": "Example/P0449/2",
|
|
"contents": "[[Has text:=[[Lorem ipsum]]]]"
|
|
},
|
|
{
|
|
"page": "Example/P0449/3",
|
|
"contents": "[[Has text:=[http://example.org/eleifend eleifend]]] [[Has text::[http://example.org/eleifend eleifend]]]"
|
|
},
|
|
{
|
|
"page": "Example/P0449/4",
|
|
"contents": "[[Has text:=[[Has number:=42]] [[Has number::1001]]]] [[Category:P0449]]"
|
|
},
|
|
{
|
|
"page": "Example/P0449/5",
|
|
"contents": "AAA[[Has text::[[Lorem ipsum]]| ]]BBB"
|
|
},
|
|
{
|
|
"page": "Example/P0449/6",
|
|
"contents": "AAA[[Has text::[[Has number::42]] [[Lorem ipsum]]| ]]BBB"
|
|
},
|
|
{
|
|
"page": "Example/P0449/7",
|
|
"contents": "AAA[[Has text::[[Has number::42| ]] [[Lorem ipsum]]| ]]BBB"
|
|
},
|
|
{
|
|
"page": "Example/P0449/8",
|
|
"contents": "AAA[[Has text::[[Has number::42|Foo]] [[Lorem ipsum]]| ]]BBB"
|
|
},
|
|
{
|
|
"page": "Example/P0449/9",
|
|
"contents": "AAA[[Has text::[[Has number::42| ]] [[Lorem ipsum]] ]]BBB"
|
|
},
|
|
{
|
|
"page": "Example/P0449/10",
|
|
"contents": "AAA[[Has text::[[Has number::42]] [[Lorem ipsum]] Foo| ]]BBB"
|
|
},
|
|
{
|
|
"page": "Example/P0449/Q.1",
|
|
"contents": "{{#ask: [[Category:P0449]] |format=embedded }}"
|
|
}
|
|
],
|
|
"tests": [
|
|
|
|
{
|
|
"type": "parser",
|
|
"about": "#1 internal wiki link",
|
|
"subject": "Example/P0449/2",
|
|
"assert-store": {
|
|
"semantic-data": {
|
|
"strictPropertyValueMatch": false,
|
|
"propertyCount": 3,
|
|
"propertyKeys": [
|
|
"_SKEY",
|
|
"_MDAT",
|
|
"Has text"
|
|
],
|
|
"propertyValues": [
|
|
"[[Lorem ipsum]]"
|
|
]
|
|
}
|
|
},
|
|
"assert-output": {
|
|
"to-contain": [
|
|
">Lorem ipsum</a>"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "parser",
|
|
"about": "#2 external link",
|
|
"subject": "Example/P0449/3",
|
|
"assert-store": {
|
|
"semantic-data": {
|
|
"strictPropertyValueMatch": false,
|
|
"propertyCount": 3,
|
|
"propertyKeys": [
|
|
"_SKEY",
|
|
"_MDAT",
|
|
"Has text"
|
|
],
|
|
"propertyValues": [
|
|
"[http://example.org/eleifend eleifend]"
|
|
]
|
|
}
|
|
},
|
|
"assert-output": {
|
|
"to-contain": [
|
|
">eleifend</a>"
|
|
],
|
|
"not-contain": [
|
|
"[[Has text::<a rel=\"nofollow\" class=\"external text\" href=\"http://example.org/eleifend\">eleifend</a>]]"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "parser",
|
|
"about": "#3 link-in annotation",
|
|
"subject": "Example/P0449/4",
|
|
"assert-store": {
|
|
"semantic-data": {
|
|
"strictPropertyValueMatch": false,
|
|
"propertyCount": 5,
|
|
"propertyKeys": [
|
|
"_SKEY",
|
|
"_MDAT",
|
|
"_INST",
|
|
"Has text",
|
|
"Has number"
|
|
],
|
|
"propertyValues": [
|
|
"42",
|
|
"1001"
|
|
]
|
|
}
|
|
},
|
|
"assert-output": {
|
|
"to-contain": [
|
|
"42 1001"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "parser",
|
|
"about": "#4 embbeded format to verify that [[SMW::OFF]]/[[SMW:ON]] remain after transclusion",
|
|
"subject": "Example/P0449/Q.1",
|
|
"assert-store": {
|
|
"semantic-data": {
|
|
"strictPropertyValueMatch": false,
|
|
"propertyCount": 3,
|
|
"propertyKeys": [
|
|
"_SKEY",
|
|
"_MDAT",
|
|
"_ASK"
|
|
],
|
|
"propertyValues": []
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "parser",
|
|
"about": "#5 hidden annotation",
|
|
"subject": "Example/P0449/5",
|
|
"assert-store": {
|
|
"semantic-data": {
|
|
"strictPropertyValueMatch": false,
|
|
"propertyCount": 3,
|
|
"propertyKeys": [
|
|
"_SKEY",
|
|
"_MDAT",
|
|
"Has text"
|
|
],
|
|
"propertyValues": [
|
|
"[[Lorem ipsum]]"
|
|
]
|
|
}
|
|
},
|
|
"assert-output": {
|
|
"to-contain": [
|
|
"AAABBB"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "parser",
|
|
"about": "#6 hidden annotation with inner annotation",
|
|
"subject": "Example/P0449/6",
|
|
"assert-store": {
|
|
"semantic-data": {
|
|
"strictPropertyValueMatch": false,
|
|
"propertyCount": 4,
|
|
"propertyKeys": [
|
|
"_SKEY",
|
|
"_MDAT",
|
|
"Has text",
|
|
"Has number"
|
|
],
|
|
"propertyValues": [
|
|
"42",
|
|
"42 [[Lorem ipsum]]"
|
|
]
|
|
}
|
|
},
|
|
"assert-output": {
|
|
"to-contain": [
|
|
"AAABBB"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "parser",
|
|
"about": "#7 hidden annotation with hidden inner annotation",
|
|
"subject": "Example/P0449/7",
|
|
"assert-store": {
|
|
"semantic-data": {
|
|
"strictPropertyValueMatch": false,
|
|
"propertyCount": 4,
|
|
"propertyKeys": [
|
|
"_SKEY",
|
|
"_MDAT",
|
|
"Has text",
|
|
"Has number"
|
|
],
|
|
"propertyValues": [
|
|
"42",
|
|
"[[Lorem ipsum]]"
|
|
]
|
|
}
|
|
},
|
|
"assert-output": {
|
|
"to-contain": [
|
|
"AAABBB"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "parser",
|
|
"about": "#8 hidden annotation with inner annotation and alternate text",
|
|
"subject": "Example/P0449/8",
|
|
"assert-store": {
|
|
"semantic-data": {
|
|
"strictPropertyValueMatch": false,
|
|
"propertyCount": 4,
|
|
"propertyKeys": [
|
|
"_SKEY",
|
|
"_MDAT",
|
|
"Has text",
|
|
"Has number"
|
|
],
|
|
"propertyValues": [
|
|
"42",
|
|
"Foo [[Lorem ipsum]]"
|
|
]
|
|
}
|
|
},
|
|
"assert-output": {
|
|
"to-contain": [
|
|
"AAABBB"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "parser",
|
|
"about": "#9 inner hidden annotation",
|
|
"subject": "Example/P0449/9",
|
|
"assert-store": {
|
|
"semantic-data": {
|
|
"strictPropertyValueMatch": false,
|
|
"propertyCount": 4,
|
|
"propertyKeys": [
|
|
"_SKEY",
|
|
"_MDAT",
|
|
"Has text",
|
|
"Has number"
|
|
],
|
|
"propertyValues": [
|
|
"42",
|
|
"[[Lorem ipsum]]"
|
|
]
|
|
}
|
|
},
|
|
"assert-output": {
|
|
"to-contain": [
|
|
">Lorem ipsum</a>BBB"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "parser",
|
|
"about": "#10 hidden annotation text before pipe",
|
|
"subject": "Example/P0449/10",
|
|
"assert-store": {
|
|
"semantic-data": {
|
|
"strictPropertyValueMatch": false,
|
|
"propertyCount": 4,
|
|
"propertyKeys": [
|
|
"_SKEY",
|
|
"_MDAT",
|
|
"Has text",
|
|
"Has number"
|
|
],
|
|
"propertyValues": [
|
|
"42",
|
|
"42 [[Lorem ipsum]] Foo"
|
|
]
|
|
}
|
|
},
|
|
"assert-output": {
|
|
"to-contain": [
|
|
"AAA42",
|
|
">Lorem ipsum</a> Foo|BBB"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"settings": {
|
|
"wgContLang": "en",
|
|
"smwgParserFeatures": [
|
|
"SMW_PARSER_STRICT",
|
|
"SMW_PARSER_INL_ERROR",
|
|
"SMW_PARSER_HID_CATS",
|
|
"SMW_PARSER_LINV"
|
|
],
|
|
"smwgPageSpecialProperties": [
|
|
"_MDAT"
|
|
]
|
|
},
|
|
"meta": {
|
|
"version": "2",
|
|
"is-incomplete": false,
|
|
"debug": false
|
|
}
|
|
} |