diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0608.json')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0608.json | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0608.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0608.json new file mode 100644 index 00000000..41ab93e0 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0608.json @@ -0,0 +1,123 @@ +{ + "description": "Test `_wpg` for single value approximate (`~/!~`) queries (#1246)", + "setup": [ + { + "namespace": "SMW_NS_PROPERTY", + "page": "Has example page", + "contents": "[[Has type::Page]]" + }, + { + "page": "Example/0608/1/1", + "contents": "[[Category:0608-1]]" + }, + { + "page": "Example/0608/1/2", + "contents": "[[Category:0608-2]]" + }, + { + "page": "Example/0608/3", + "contents": "[[Category:0608-3]] [[Has example page::Example/0608/3]]" + } + ], + "tests": [ + { + "type": "query", + "about": "#0", + "condition": "[[Example/0608/1/1]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 1, + "results": [ + "Example/0608/1/1#0##" + ] + } + }, + { + "type": "query", + "about": "#1", + "condition": "[[Example/0608/1/1]] OR [[Example/0608/3]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 2, + "results": [ + "Example/0608/1/1#0##", + "Example/0608/3#0##" + ] + } + }, + { + "type": "query", + "about": "#2", + "condition": "[[~Example/0608/*]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 3, + "results": [ + "Example/0608/1/1#0##", + "Example/0608/1/2#0##", + "Example/0608/3#0##" + ] + } + }, + { + "type": "query", + "about": "#3", + "condition": "[[~Example/0608/*]][[!~Example/0608/1/*]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 1, + "results": [ + "Example/0608/3#0##" + ] + } + }, + { + "type": "query", + "about": "#4", + "condition": "[[~Example/0608/*]] [[Category:0608-2]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 1, + "results": [ + "Example/0608/1/2#0##" + ] + } + }, + { + "type": "query", + "about": "#5", + "condition": "[[~Example/0608/*]] [[Has example page::Example/0608/3]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 1, + "results": [ + "Example/0608/3#0##" + ] + } + } + ], + "settings": [], + "meta": { + "version": "2", + "is-incomplete": false, + "debug": false + } +}
\ No newline at end of file |