gplx/mediawiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0921.json

71 lines
1.4 KiB
JSON

{
"description": "Test #ask with pipe trick output (#3945)",
"setup": [
{
"page": "Page0 (parenthesis)",
"namespace": "NS_MAIN",
"contents": "[[Category:P0921]]"
},
{
"page": "Yours, Mine and Ours (1968 film)",
"namespace": "NS_MAIN",
"contents": "[[Category:P0921]] [[Has page::Il Buono, il Brutto, il Cattivo]]"
},
{
"page": "P0921/Q.1",
"namespace": "NS_MAIN",
"contents": "{{#ask: [[Category:P0921]] }}"
},
{
"page": "P0921/Q.2",
"namespace": "NS_MAIN",
"contents": "{{#ask: [[Category:P0921]] |?Has page }}"
}
],
"tests": [
{
"type": "parser",
"about": "#0 (parenthetical page titles stripped as per pipe trick)",
"subject": "P0921/Q.1",
"assert-output": {
"to-contain": [
">Page0<"
],
"not-contain": [
">Page0 (parenthesis)<"
]
}
},
{
"type": "parser",
"about": "#1 (pipe trick on subject and printout)",
"subject": "P0921/Q.2",
"assert-output": {
"to-contain": [
">Yours, Mine and Ours<",
">Il Buono<"
],
"not-contain": [
">Yours, Mine and Ours (1968 film)<",
">Il Buono, il Brutto, il Cattivo<"
]
}
}
],
"settings": {
"wgContLang": "en",
"wgLang": "en",
"smwgPageSpecialProperties": [
"_MDAT"
],
"smwgDVFeatures": [
"SMW_DV_WPV_PIPETRICK"
]
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}