diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0210.json')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0210.json | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0210.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0210.json new file mode 100644 index 00000000..b0266798 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0210.json @@ -0,0 +1,76 @@ +{ + "description": "Test `format=table` on `_qty` for unit labels with spaces (#1718, `wgContLang=en`, `SMW_DV_NUMV_USPACE`)", + "setup": [ + { + "namespace": "SMW_NS_PROPERTY", + "page": "Has area with spaces", + "contents": "[[Has type::Quantity]], [[Corresponds to::1 km², km ²]] [[Corresponds to::0.38610 sq mi, sqmi]] [[Corresponds to::1000 m², m ²]]" + }, + { + "page": "Example/F0210/1", + "contents": "[[Has area with spaces::10 km ²]] [[Has area with spaces::3 sqmi]] [[Has area with spaces::50 m ²]] [[Category:F0210]]" + }, + { + "page": "Example/F0210/Q1.1", + "contents": "{{#ask: [[Category:F0210]][[Has area with spaces::+]] |?Has area with spaces |format=table |headers=plain }}" + }, + { + "page": "Example/F0210/Q1.2", + "contents": "{{#ask: [[Has area with spaces::10 km ²]] |format=table |headers=plain |link=none }}" + }, + { + "page": "Example/F0210/Q1.3", + "contents": "{{#ask: [[Has area with spaces::10 km²]] |format=table |headers=plain |link=none }}" + } + ], + "tests": [ + { + "type": "format", + "about": "#0", + "subject": "Example/F0210/Q1.1", + "assert-output": { + "to-contain": [ + "<span class=\"smwtext\">10 km²</span><span class=\"smwttcontent\">3.861 sq mi <br />10,000 m² <br /></span></span>", + "<span class=\"smwtext\">7.77 km²</span><span class=\"smwttcontent\">3 sq mi <br />7,770.008 m² <br /></span></span>", + "<span class=\"smwtext\">0.05 km²</span><span class=\"smwttcontent\">0.0193 sq mi <br />50 m² <br /></span></span>" + ] + } + }, + { + "type": "format", + "about": "#1", + "subject": "Example/F0210/Q1.2", + "assert-output": { + "to-contain": [ + "<td class=\"smwtype_wpg\">Example/F0210/1</td>" + ] + } + }, + { + "type": "format", + "about": "#2", + "subject": "Example/F0210/Q1.3", + "assert-output": { + "to-contain": [ + "<td class=\"smwtype_wpg\">Example/F0210/1</td>" + ] + } + } + ], + "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 + } +}
\ No newline at end of file |