Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (52 sloc) 2.03 KB
{
"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\">€&#160;12</span><span class=\"smwttcontent\">8.4&#160;£ &lt;br /&gt;¥&#160;1,370.545 &lt;br /&gt;</span></span>",
"<span class=\"smwtext\">€&#160;4.378</span><span class=\"smwttcontent\">3.064&#160;£ &lt;br /&gt;¥&#160;500 &lt;br /&gt;</span></span>",
"<span class=\"smwtext\">€&#160;2.857</span><span class=\"smwttcontent\">2&#160;£ &lt;br /&gt;¥&#160;326.32 &lt;br /&gt;</span></span>",
"<span class=\"smwtext\">€&#160;20</span><span class=\"smwttcontent\">14&#160;£ &lt;br /&gt;¥&#160;2,284.242 &lt;br /&gt;</span></span>",
"<span class=\"smwtext\">€&#160;17.511</span><span class=\"smwttcontent\">12.258&#160;£ &lt;br /&gt;¥&#160;2,000 &lt;br /&gt;</span></span>",
"<span class=\"smwtext\">€&#160;0.714</span><span class=\"smwttcontent\">0.5&#160;£ &lt;br /&gt;¥&#160;81.58 &lt;br /&gt;</span></span>"
]
}
}
],
"settings": {
"wgContLang": "en",
"wgLang": "en",
"smwgNamespacesWithSemanticLinks": {
"NS_MAIN": true,
"SMW_NS_PROPERTY": true
}
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}
You can’t perform that action at this time.