diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0411.json')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0411.json | 151 |
1 files changed, 151 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0411.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0411.json new file mode 100644 index 00000000..26f07d33 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0411.json @@ -0,0 +1,151 @@ +{ + "description": "Test in-text annotation (and #subobject) using a monolingual property (#1344, en)", + "setup": [ + { + "namespace": "SMW_NS_PROPERTY", + "page": "Has text with language", + "contents": "[[Has type::Monolingual text]]" + }, + { + "page": "Example/P0411/1", + "contents": "[[Has text with language::example one@en]]" + }, + { + "page": "Example/P0411/1/1", + "contents": "{{#ask: [[Has text with language::example one@en]] |?Has text with language }}" + }, + { + "page": "Example/P0411/1/2", + "contents": "{{#ask: [[-Has text with language::Example/P0411/1]] |?Language code |?Text }}" + }, + { + "page": "Example/P0411/2", + "contents": "{{#subobject: |Has text with language=例の一@ja }} {{#subobject: |Has text with language=pour l'exemple@fr }}" + }, + { + "page": "Example/P0411/2/1", + "contents": "{{#ask: [[Has text with language::?@ja]] |?Has text with language }}" + }, + { + "page": "Example/P0411/2/2", + "contents": "{{#ask: [[Language code::ja]] |?Text }}" + }, + { + "page": "Example/P0411/2/3", + "contents": "{{#ask: [[Language code::ja]] |?-Has text with language }}" + }, + { + "page": "Example/P0411/3", + "contents": "{{#subobject: |Has text with language=国@zh-hans }} {{#subobject: |Has text with language=國@zh-hant }}" + }, + { + "page": "Example/P0411/3/1", + "contents": "{{#ask: [[Has text with language::?@~zh*]] |?Has text with language=Text |+index=1 |?Has text with language=Code |+index=2 }}" + } + ], + "tests": [ + { + "type": "parser", + "about": "#0", + "subject": "Example/P0411/1", + "assert-store": { + "semantic-data": { + "strictPropertyValueMatch": false, + "propertyCount": 3, + "propertyKeys": [ + "Has_text_with_language", + "_SKEY", + "_MDAT" + ], + "propertyValues": [] + } + }, + "assert-output": { + "to-contain": [ + "example one (en)" + ] + } + }, + { + "type": "parser", + "about": "#1 match subject", + "subject": "Example/P0411/1/1", + "assert-output": { + "to-contain": [ + "Example/P0411/1", + "class=\"Has-text-with-language smwtype_mlt_rec\">example one (en)" + ] + } + }, + { + "type": "parser", + "about": "#2 inverse match", + "subject": "Example/P0411/1/2", + "assert-output": { + "to-contain": [ + "Example/P0411/1#_ML3c1364d804527cd1594b4817b01c29f0", + "class=\"Language-code smwtype__lcode\">en", + "class=\"Text smwtype_txt\">example one" + ] + } + }, + { + "type": "parser", + "about": "#3 match specific language", + "subject": "Example/P0411/2/1", + "assert-output": { + "to-contain": [ + "Example/P0411/2#_b88331e53ca614aea6f7c8b5f0d6f876", + "class=\"Has-text-with-language smwtype_mlt_rec\">例の一 (ja)" + ] + } + }, + { + "type": "parser", + "about": "#4 match specific language", + "subject": "Example/P0411/2/2", + "assert-output": { + "to-contain": [ + "Example/P0411/2#_ML13e9d4c2ba826927d7210acab7def9ec", + "class=\"Text smwtype_txt\">例の一" + ] + } + }, + { + "type": "parser", + "about": "#5 match specific language with inverse printout", + "subject": "Example/P0411/2/3", + "assert-output": { + "to-contain": [ + "Example/P0411/2#_ML13e9d4c2ba826927d7210acab7def9ec", + "title=\"Property:Has text with language\">-Has text with language", + "class=\"-Has-text-with-language smwtype_mlt_rec\">Example/P0411/2" + ] + } + }, + { + "type": "parser", + "about": "#6 using index display for columns", + "subject": "Example/P0411/3/1", + "assert-output": { + "to-contain": [ + "Example/P0411/3#_a52273132da28d0c1fad5819e44958ab", + "class=\"Text smwtype_txt\">国", + "class=\"Code smwtype__lcode\">zh-Hans", + "Example/P0411/3#_4eac5791ab0478bb01dc9d181bc91ec8", + "class=\"Text smwtype_txt\">國", + "class=\"Code smwtype__lcode\">zh-Hant" + ] + } + } + ], + "settings": { + "wgContLang": "en", + "wgLang": "en" + }, + "meta": { + "version": "2", + "is-incomplete": false, + "debug": false + } +}
\ No newline at end of file |