summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1102.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1102.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1102.json95
1 files changed, 95 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1102.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1102.json
new file mode 100644
index 00000000..854b954a
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1102.json
@@ -0,0 +1,95 @@
+{
+ "description": "Test `_rec` queries in combination with `_dat` `~/!~` search pattern (#1178, `smwStrictComparators=false`, skip virtuoso)",
+ "setup": [
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has status",
+ "contents": "[[Has type::Text]] [[Allows value::open]] [[Allows value::closed]] [[Allows value::in progress]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has date",
+ "contents": "[[Has type::Date]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has status record",
+ "contents": "[[Has type::Record]] [[Has fields::Has date; Has status]]"
+ },
+ {
+ "page": "Example/1102/15-Dec-2007",
+ "contents": "{{#subobject:|@category=E-1102|Has status record=15 Dec 2007;closed}}{{#subobject:|@category=E-1102 |Has status record=15 Dec 2007;open}}"
+ },
+ {
+ "page": "Example/1102/16-Dec-2007",
+ "contents": "{{#subobject:|@category=E-1102 |Has status record=16 Dec 2007;closed}}"
+ },
+ {
+ "page": "Example/1102/345-BC",
+ "contents": "{{#subobject:|@category=E-1102|Has status record=345 BC;closed}}"
+ }
+ ],
+ "tests": [
+ {
+ "type": "query",
+ "about": "#0 disjunctive match for any status",
+ "condition": "[[Category:E-1102]] [[Has status record::~Dec 2007;?]] OR [[Has status record::~345 BC;?]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 4,
+ "results": [
+ "Example/1102/15-Dec-2007#0##_32971b257b2cfa9a364ae22e21ab4adf",
+ "Example/1102/15-Dec-2007#0##_a95f61c99770cf350f1388ae46e973bb",
+ "Example/1102/16-Dec-2007#0##_f1fd6537c6d2576390a45ba86e58ed5b",
+ "Example/1102/345-BC#0##_6f2d86633d90e76f0e9fa5e5d1fe6598"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#1 all closed in Dec 2007",
+ "condition": "[[Category:E-1102]] [[Has status record::~Dec 2007;closed]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 2,
+ "results": [
+ "Example/1102/15-Dec-2007#0##_32971b257b2cfa9a364ae22e21ab4adf",
+ "Example/1102/16-Dec-2007#0##_f1fd6537c6d2576390a45ba86e58ed5b"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#2 all closed not at the 15 Dec 2007",
+ "condition": "[[Category:E-1102]] [[Has status record::!~ 15 Dec 2007;closed]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 2,
+ "results": [
+ "Example/1102/16-Dec-2007#0##_f1fd6537c6d2576390a45ba86e58ed5b",
+ "Example/1102/345-BC#0##_6f2d86633d90e76f0e9fa5e5d1fe6598"
+ ]
+ }
+ }
+ ],
+ "settings": {
+ "smwStrictComparators": false
+ },
+ "meta": {
+ "skip-on": {
+ "virtuoso": "Virtuoso 6.1 fails for BC"
+ },
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+} \ No newline at end of file