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
|
{
"description": "Test in-text annotation on `_tem` with display unit preference (en)",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has temperature",
"contents": "[[Has type::Temperature]] [[Display unit::Celsius]]"
},
{
"page": "Example/P0415/1",
"contents": "[[Has temperature:: 32 °F]] [[Has temperature::100 °C]]"
},
{
"page": "Example/P0415/1a",
"contents": "{{#ask: [[Example/P0415/1]] |?Has temperature |?Has temperature#-=- |?Has temperature#-u=-u |?Has temperature#-n=-n |?Has temperature#°R=°R |format=table }}"
}
],
"tests": [
{
"type": "parser",
"about": "#0",
"subject": "Example/P0415/1",
"assert-store": {
"semantic-data": {
"strictPropertyValueMatch": false,
"propertyCount": 3,
"propertyKeys": [
"_SKEY",
"_MDAT",
"Has_temperature"
],
"propertyValues": [
273.15,
373.15
]
}
}
},
{
"type": "parser",
"about": "#2",
"subject": "Example/P0415/1a",
"assert-output": {
"to-contain": [
"<span class=\"smwtext\">0 °C</span><span class=\"smwttcontent\">273.15 K <br />32 °F <br />491.67 °R <br /></span></span>",
"<span class=\"smwtext\">100 °C</span><span class=\"smwttcontent\">373.15 K <br />212 °F <br />671.67 °R <br /></span></span>",
"<td class=\"- smwtype_tem\" data-sort-value=\"273.15\">0 °C<br />100 °C</td>",
"<td class=\"-u smwtype_tem\" data-sort-value=\"273.15\">°C<br />°C</td>",
"<td class=\"-n smwtype_tem\" data-sort-value=\"273.15\">0 <br />100 </td>",
"<span class=\"smwtext\">491.67 °R</span><span class=\"smwttcontent\">0 °C <br />273.15 K <br />32 °F <br /></span></span>",
"<span class=\"smwtext\">671.67 °R</span><span class=\"smwttcontent\">100 °C <br />373.15 K <br />212 °F <br /></span></span>"
]
}
}
],
"settings": {
"wgContLang": "en",
"wgLang": "en"
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}
|