diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0431.json')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0431.json | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0431.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0431.json new file mode 100644 index 00000000..e9c1c1f0 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0431.json @@ -0,0 +1,84 @@ +{ + "description": "Test in-text annotation `_rec` and `|+index` (`wgContLang=en`, `wgLang=en`)", + "setup": [ + { + "namespace": "SMW_NS_PROPERTY", + "page": "Has text", + "contents": "[[Has type::Text]]" + }, + { + "namespace": "SMW_NS_PROPERTY", + "page": "Has number", + "contents": "[[Has type::Number]]" + }, + { + "namespace": "SMW_NS_PROPERTY", + "page": "Has record", + "contents": "[[Has type::Record]] [[Has fields::Has text;Has number]] [[Has property description::Test@en]]" + }, + { + "page": "Example/P0431/1", + "contents": "[[Has record::Foo;123]]" + }, + { + "page": "Example/P0431/Q1.1", + "contents": "{{#ask: [[Has record::+]] |?Has record|+index=Has text}}" + }, + { + "page": "Example/P0431/Q1.2", + "contents": "{{#ask: [[Has record::+]] |?Has record|+index=Has number|?Has record|+index=Has text}}" + }, + { + "page": "Example/P0431/Q2.1", + "contents": "{{#ask: [[Has property description::Test@en]] |?Has property description|+index=Language code}}" + } + ], + "tests": [ + { + "type": "parser", + "about": "#0", + "subject": "Example/P0431/Q1.1", + "assert-output": { + "to-contain": [ + "Example/P0431/1", + "<td class=\"Has-record smwtype_txt\">Foo</td>" + ], + "not-contain": [ + "<td class=\"Has-record smwtype_num\" data-sort-value=\"123\">123</td>" + ] + } + }, + { + "type": "parser", + "about": "#1", + "subject": "Example/P0431/Q1.2", + "assert-output": { + "to-contain": [ + "Example/P0431/1", + "<td class=\"Has-record smwtype_txt\">Foo</td>", + "<td class=\"Has-record smwtype_num\" data-sort-value=\"123\">123</td>" + ] + } + }, + { + "type": "parser", + "about": "#2", + "subject": "Example/P0431/Q2.1", + "assert-output": { + "to-contain": [ + "Property:Has record", + "<td class=\"Property-description smwtype__lcode\">en</td>" + ] + } + } + ], + "settings": { + "wgContLang": "en", + "wgLang": "en" + }, + "meta": { + "version": "2", + "is-incomplete": false, + "debug": false + } +}
\ No newline at end of file |