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
|
{
"description": "Test `format=list, ul, ol` on `_qty` property (`wgContLang=en`, `SMW_DV_NUMV_USPACE`)",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has area",
"contents": "[[Has type::Quantity]], [[Corresponds to::1 km², km ²]] [[Corresponds to::0.38610 sq mi, sqmi]] [[Corresponds to::1000 m², m ²]]"
},
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has text",
"contents": "[[Has type::Text]]"
},
{
"page": "Example/F0105/1",
"contents": "[[Has area::10 km ²]] [[Category:F0105]]"
},
{
"page": "Example/F0105/2",
"contents": "[[Has text::Test <li>Item</li>]] [[Category:F0105]]"
},
{
"page": "Example/F0105/Q.1.1",
"contents": "{{#ask: [[Category:F0105]] [[Has area::+]] |?Has area |format=list |headers=plain }}"
},
{
"page": "Example/F0105/Q.1.2",
"contents": "{{#ask: [[Category:F0105]] [[Has area::+]] |?Has area |format=ul |headers=plain }}"
},
{
"page": "Example/F0105/Q.1.3",
"contents": "{{#ask: [[Category:F0105]] [[Has area::+]] |?Has area |format=ol |headers=plain }}"
},
{
"page": "Example/F0105/Q.2.1",
"contents": "{{#ask: [[Category:F0105]] [[Has text::+]] |?Has text |format=list |headers=plain }}"
},
{
"page": "Example/F0105/Q.2.2",
"contents": "{{#ask: [[Category:F0105]] [[Has text::+]] |?Has text |format=ul |headers=plain }}"
},
{
"page": "Example/F0105/Q.2.3",
"contents": "{{#ask: [[Category:F0105]] [[Has text::+]] |?Has text |format=ol |headers=plain }}"
}
],
"tests": [
{
"type": "format",
"about": "#0 (format=list)",
"subject": "Example/F0105/Q.1.1",
"assert-output": {
"to-contain": [
"title=\"3.861 sq mi 10,000 m²\"><span class=\"smwtext\">10 km²</span><span class=\"smwttcontent\">3.861 sq mi <br />10,000 m² <br /></span>"
]
}
},
{
"type": "format",
"about": "#1 (format=ul)",
"subject": "Example/F0105/Q.1.2",
"assert-output": {
"to-contain": [
"title=\"3.861 sq mi 10,000 m²\"><span class=\"smwtext\">10 km²</span><span class=\"smwttcontent\">3.861 sq mi <br />10,000 m² <br /></span>"
]
}
},
{
"type": "format",
"about": "#2 (format=ol)",
"subject": "Example/F0105/Q.1.3",
"assert-output": {
"to-contain": [
"title=\"3.861 sq mi 10,000 m²\"><span class=\"smwtext\">10 km²</span><span class=\"smwttcontent\">3.861 sq mi <br />10,000 m² <br /></span>"
]
}
},
{
"type": "format",
"about": "#3 (format=list) with <li> element",
"subject": "Example/F0105/Q.2.1",
"assert-output": {
"to-contain": [
"title=\"Example/F0105/2\">Example/F0105/2</a></span></span> (<span class=\"smw-field\"><span class=\"smw-field-label\">Has text</span>: <span class=\"smw-value\">Test <li>Item</li></span></span>)"
]
}
},
{
"type": "format",
"about": "#4 (format=ul) with sanitized <li> element",
"subject": "Example/F0105/Q.2.2",
"assert-output": {
"to-contain": [
"title=\"Example/F0105/2\">Example/F0105/2</a></span></span> (<span class=\"smw-field\"><span class=\"smw-field-label\">Has text</span>: <span class=\"smw-value\">Test <li>Item</li></span></span>)</li>"
]
}
},
{
"type": "format",
"about": "#5 (format=ol) with sanitized <li> element",
"subject": "Example/F0105/Q.2.3",
"assert-output": {
"to-contain": [
"title=\"Example/F0105/2\">Example/F0105/2</a></span></span> (<span class=\"smw-field\"><span class=\"smw-field-label\">Has text</span>: <span class=\"smw-value\">Test <li>Item</li></span></span>)</li>"
]
}
}
],
"settings": {
"wgContLang": "en",
"wgLang": "en",
"smwgDVFeatures": [
"SMW_DV_NUMV_USPACE"
],
"smwgNamespacesWithSemanticLinks": {
"NS_MAIN": true,
"SMW_NS_PROPERTY": true
}
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}
|