summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0607.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0607.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0607.json116
1 files changed, 116 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0607.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0607.json
new file mode 100644
index 00000000..0d9e50fd
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0607.json
@@ -0,0 +1,116 @@
+{
+ "description": "Test `_wpg`/`_dat`/`_num`/`_txt` subquery example",
+ "setup": [
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has project",
+ "contents": "[[Has type::Page]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has project manager",
+ "contents": "[[Has type::Page]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has project pool",
+ "contents": "[[Has type::Page]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has project assistant",
+ "contents": "[[Has type::Page]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has project name",
+ "contents": "[[Has type::Page]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has project due date",
+ "contents": "[[Has type::Date]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has project level access",
+ "contents": "[[Has type::Number]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has name",
+ "contents": "[[Has type::Text]]"
+ },
+ {
+ "page": "P-100",
+ "contents": "[[Category:Project]][[Has project name::P-100]][[Has project due date::10/30/2015]]"
+ },
+ {
+ "page": "山田一郎",
+ "contents": "[[Category:Project assistant]] [[Has name::{{PAGENAME}}]] [[Has project level access::5]]"
+ },
+ {
+ "page": "Clara Young",
+ "contents": "[[Category:Project assistant]] [[Has name::{{PAGENAME}}]] [[Has project level access::6]]"
+ },
+ {
+ "page": "John Doe",
+ "contents": "[[Category:Person]] [[Category:Project manager]] [[Has name::{{PAGENAME}}]] [[Has project assistant::Clara Young]] [[Has project assistant::山田一郎]]"
+ },
+ {
+ "page": "Example/0607/PP-100",
+ "contents": "{{#subobject:|@category=Project pool |Has project=P-100 |Has project manager=John Doe |Has project pool={{PAGENAME}} }} {{#subobject:|@category=Project pool |Has project=P-200 |Has project manager=John Doe |Has project pool={{PAGENAME}} }}"
+ }
+ ],
+ "tests": [
+ {
+ "type": "query",
+ "about": "#0 conjunctive/disjunctive subquery; What projects are due where Jon Doe is assigned (with either Clara Young or 山田一郎); Query-Size:15 / Query-Depth:2",
+ "condition": "[[Category:Project pool]] [[Has project::<q>[[Has project name::P-100]] [[Has project due date::>9/24/2015]]</q>]] [[Has project manager::<q>[[Has name::John Doe]] [[Has project assistant::山田一郎]] OR [[Has name::John Doe]] [[Has project assistant::Clara Young]]</q>]]",
+ "printouts": [
+ "Has project manager",
+ "Has project"
+ ],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 1,
+ "results": [
+ "Example/0607/PP-100#0##_43aaa7182890fb917e6cc82bf6083abb"
+ ],
+ "dataitems": [
+ {
+ "type": "_wpg",
+ "value": "John_Doe#0##"
+ },
+ {
+ "type": "_wpg",
+ "value": "P-100#0##"
+ }
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#1 conjunctive subquery; What projects are due where Jon Doe is assigned (together with a level 5 assistant); Query-Size:12 / Query-Depth:3",
+ "condition": "[[Category:Project pool]] [[Has project::<q>[[Has project name::P-100]] [[Has project due date::>9/24/2015]]</q>]] [[Has project manager::<q>[[Has name::John Doe]] [[Has project assistant.Has project level access::5]]</q>]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 1,
+ "results": [
+ "Example/0607/PP-100#0##_43aaa7182890fb917e6cc82bf6083abb"
+ ]
+ }
+ }
+ ],
+ "settings": [],
+ "meta": {
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+} \ No newline at end of file