1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
{
"description": "Test `Special:Ask` output for `format=rdf`/`format=json`/DISPLAYTITLE (#1453, #1619, `wgRestrictDisplayTitle`, `wgContLang=en`)",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has boolean",
"contents": "[[Has type::Boolean]]"
},
{
"page": "Example/S0003/1",
"contents": "[[Has boolean::true]] [[Category:S0003]]"
},
{
"page": "Example/S0003/2",
"contents": "{{DISPLAYTITLE:FOO-S0003}} [[Category:S0003]]"
},
{
"page": "Example/S0003/Q1",
"contents": "{{#ask: [[Category:S0003]] |?Category |?Has boolean=Text |link=none |format=rdf }}"
}
],
"tests": [
{
"type": "parser",
"about": "#0",
"subject": "Example/S0003/Q1",
"assert-store": {
"semantic-data": {
"strictPropertyValueMatch": false,
"propertyCount": 3,
"propertyKeys": [
"_MDAT",
"_SKEY",
"_ASK"
],
"propertyValues": []
}
},
"assert-output": {
"to-contain": [
"-5B-5BCategory:S0003-5D-5D/-3FCategory/-3FHas-20boolean=Text/mainlabel=/limit=100/offset=0/format=rdf/link=none\">RDF</a>"
]
}
},
{
"type": "special",
"about": "#1",
"special-page": {
"page": "Ask",
"query-parameters": "-5B-5BCategory:S0003-5D-5D/-3FCategory/-3FHas-20boolean=Text/mainlabel=/limit=100/offset=0/format=rdf/link=none",
"request-parameters": []
},
"assert-output": {
"to-contain": [
"<rdfs:label>Example/S0003/1</rdfs:label>",
"<property:Has_boolean rdf:datatype=\"http://www.w3.org/2001/XMLSchema#boolean\">true</property:Has_boolean>",
"<swivt:type rdf:resource=\"http://example.org/id/Category-3AS0003\"/>"
]
}
},
{
"type": "special",
"about": "#2",
"skip-on": {
"mw-1.19.20": "Skipping because of spaces in output fields being different",
"mw-1.22.12": "Skipping because of spaces in output fields being different"
},
"special-page": {
"page": "Ask",
"query-parameters": "-5B-5BCategory:S0003-5D-5D/-3FCategory/-3FHas-20boolean=Text/mainlabel=/limit=100/offset=0/format=json/unescape=true/prettyprint=true/link=none",
"request-parameters": []
},
"assert-output": {
"to-contain": [
"\"fulltext\": \"Category:S0003\"",
"\"fulltext\": \"Example/S0003/1\"",
"\"key\": \"Has_boolean\""
]
}
},
{
"type": "special",
"about": "#3 (link=subject)",
"special-page": {
"page": "Ask",
"query-parameters": "-5B-5BCategory:S0003-5D-5D/mainlabel=/offset=0/format=table/link=subject",
"request-parameters": []
},
"assert-output": {
"to-contain": [
"FOO-S0003"
]
}
},
{
"type": "special",
"about": "#4 (link=none)",
"special-page": {
"page": "Ask",
"query-parameters": "-5B-5BCategory:S0003-5D-5D/mainlabel=/offset=0/format=table/link=none",
"request-parameters": []
},
"assert-output": {
"to-contain": [
"Example/S0003/2"
],
"not-contain": [
"FOO-S0003"
]
}
}
],
"settings": {
"wgContLang": "en",
"wgLanguageCode": "en",
"wgRestrictDisplayTitle": false,
"smwgNamespace": "http://example.org/id/",
"smwgPageSpecialProperties": [
"_MDAT"
],
"smwgNamespacesWithSemanticLinks": {
"NS_MAIN": true,
"SMW_NS_PROPERTY": true
}
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}
|