summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0204.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0204.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0204.json52
1 files changed, 52 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0204.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0204.json
new file mode 100644
index 00000000..6836cedd
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0204.json
@@ -0,0 +1,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\">€&#160;12</span><span class=\"smwttcontent\">8.4&#160;£ <br />¥&#160;1,370.545 <br /></span></span>",
+ "<span class=\"smwtext\">€&#160;4.378</span><span class=\"smwttcontent\">3.064&#160;£ <br />¥&#160;500 <br /></span></span>",
+ "<span class=\"smwtext\">€&#160;2.857</span><span class=\"smwttcontent\">2&#160;£ <br />¥&#160;326.32 <br /></span></span>",
+ "<span class=\"smwtext\">€&#160;20</span><span class=\"smwttcontent\">14&#160;£ <br />¥&#160;2,284.242 <br /></span></span>",
+ "<span class=\"smwtext\">€&#160;17.511</span><span class=\"smwttcontent\">12.258&#160;£ <br />¥&#160;2,000 <br /></span></span>",
+ "<span class=\"smwtext\">€&#160;0.714</span><span class=\"smwttcontent\">0.5&#160;£ <br />¥&#160;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
+ }
+} \ No newline at end of file