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
|
{
"description": "Test `format=table` on `_qty` for different positional unit preference (#1329, en)",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "Currency",
"contents": "[[Has type::Quantity]], [[Display units::€,£,¥]] [[Corresponds to::€ 1]] [[Corresponds to::1.06 US, US$, $]] [[Corresponds to::0.70 British Pound,GBP,£]] [[Corresponds to::¥,JPY,Japanese Yen 114.2121]]"
},
{
"page": "Example/F0204/1",
"contents": "[[Currency::12 €]] [[Currency::¥ 500]] [[Currency::2 £]]"
},
{
"page": "Example/F0204/2",
"contents": "[[Currency::€ 20]] [[Currency::2000 JPY]] [[Currency::0.5 GBP]]"
},
{
"page": "Example/F0204/3",
"contents": "{{#ask: [[Currency::+]] |?Currency |format=table |headers=plain }}"
}
],
"tests": [
{
"type": "format",
"about": "#0 output with different positional preference",
"subject": "Example/F0204/3",
"assert-output": {
"to-contain": [
"<span class=\"smwtext\">€ 12</span><span class=\"smwttcontent\">8.4 £ <br />¥ 1,370.545 <br /></span></span>",
"<span class=\"smwtext\">€ 4.378</span><span class=\"smwttcontent\">3.064 £ <br />¥ 500 <br /></span></span>",
"<span class=\"smwtext\">€ 2.857</span><span class=\"smwttcontent\">2 £ <br />¥ 326.32 <br /></span></span>",
"<span class=\"smwtext\">€ 20</span><span class=\"smwttcontent\">14 £ <br />¥ 2,284.242 <br /></span></span>",
"<span class=\"smwtext\">€ 17.511</span><span class=\"smwttcontent\">12.258 £ <br />¥ 2,000 <br /></span></span>",
"<span class=\"smwtext\">€ 0.714</span><span class=\"smwttcontent\">0.5 £ <br />¥ 81.58 <br /></span></span>"
]
}
}
],
"settings": {
"wgContLang": "en",
"wgLang": "en",
"smwgNamespacesWithSemanticLinks": {
"NS_MAIN": true,
"SMW_NS_PROPERTY": true
}
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}
|