{ "description": "Test #ask with `format=table` on inverse property, property path", "setup": [ { "namespace": "SMW_NS_PROPERTY", "page": "Has page", "contents": "[[Has type::Page]]" }, { "namespace": "SMW_NS_PROPERTY", "page": "Has number", "contents": "[[Has type::Number]]" }, { "page": "P0709/1", "contents": "[[Has number::123]] [[Has page::ABC]] [[Category:P0709]]" }, { "page": "P0709/2", "contents": "[[Has number::1234]] [[Has page::DEF]] [[Category:P0709]]" }, { "page": "P0709/3", "contents": "{{#subobject:A |@category=P0709}} {{#subobject:B |@category=P0709}}" }, { "page": "P0709/Q.1", "contents": "{{#ask: [[-Has page.Has number::123]] |?Has page |format=table}}" }, { "page": "P0709/Q.2", "contents": "{{#ask: [[-Has page.Has number::+]] |?Has page |order=asc |format=table}}" }, { "page": "P0709/Q.3", "contents": "{{#ask: [[-Has page.Has number::+]] |?Has page |order=desc |format=table}}" }, { "page": "P0709/Q.4", "contents": "{{#ask: [[-Has subobject::+]] [[Category:P0709]] |order=asc |format=table}}" }, { "page": "P0709/Q.5", "contents": "{{#ask: [[-Has number::+]] |format=table |default=is empty}}" } ], "tests": [ { "type": "parser", "about": "#0 (-Has page.Has number::123)", "subject": "P0709/Q.1", "assert-output": { "to-contain": [ "ABC" ] } }, { "type": "parser", "about": "#1 (-Has page.Has number::+, sort=asc)", "subject": "P0709/Q.2", "assert-output": { "to-contain": [ "ABC", "DEF" ] } }, { "type": "parser", "about": "#2 (-Has page.Has number::+, sort=desc)", "subject": "P0709/Q.3", "assert-output": { "to-contain": [ "DEF", "ABC" ] } }, { "type": "parser", "about": "#3 (-Has subobject::+, sort=asc)", "subject": "P0709/Q.4", "assert-output": { "to-contain": [ "P0709/3#A", "P0709/3#B" ] } } ], "settings": { "wgContLang": "en", "wgLang": "en", "smwgPageSpecialProperties": [ "_MDAT" ] }, "meta": { "version": "2", "is-incomplete": false, "debug": false } }