summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1106.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1106.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1106.json116
1 files changed, 116 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1106.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1106.json
new file mode 100644
index 00000000..0e1c0bdd
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1106.json
@@ -0,0 +1,116 @@
+{
+ "description": "Test `_rec` with `~/!~` comparators on allowed values (#1207, `smwStrictComparators=false`)",
+ "setup": [
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has restricted status record",
+ "contents": "[[Has type::Text]] [[Allows value::open]], [[Allows value::closed]], [[Allows value::in progress]]"
+ },
+ {
+ "page": "Example/Q1106/1",
+ "contents": "[[Category:E-Q1106]][[Has restricted status record::open]]"
+ },
+ {
+ "page": "Example/Q1106/2",
+ "contents": "[[Category:E-Q1106]]{{#set:Has restricted status record=closed}}"
+ },
+ {
+ "page": "Example/Q1106/3",
+ "contents": "{{#subobject:Has restricted status record=in progress|@category=E-Q1106}}"
+ },
+ {
+ "page": "Example/Q1106/4",
+ "contents": "[[Category:E-Q1106]][[Has restricted status record::none of the above]]"
+ }
+ ],
+ "tests": [
+ {
+ "type": "query",
+ "about": "#0 like *en*",
+ "condition": "[[Category:E-Q1106]][[Has restricted status record::~*en*]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 1,
+ "results": [
+ "Example/Q1106/1#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#1 like cl*",
+ "condition": "[[Category:E-Q1106]][[Has restricted status record::~cl*]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 1,
+ "results": [
+ "Example/Q1106/2#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#2 not like cl*",
+ "condition": "[[Category:E-Q1106]][[Has restricted status record::!~cl*]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 2,
+ "results": [
+ "Example/Q1106/1#0##",
+ "Example/Q1106/3#0##_5005bc588cbc65273b9c8d9b96bf5c01"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#3 not like cl* AND *in*",
+ "condition": "[[Category:E-Q1106]]<q>[[Has restricted status record::!~cl*]] AND [[Has restricted status record::!~*in*]]</q>",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 1,
+ "results": [
+ "Example/Q1106/1#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#4 not like cl* OR *in* (doesn't make much sense, we test it anyway)",
+ "condition": "[[Category:E-Q1106]]<q>[[Has restricted status record::!~cl*]] OR [[Has restricted status record::!~*in*]]</q>",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 3,
+ "results": [
+ "Example/Q1106/1#0##",
+ "Example/Q1106/2#0##",
+ "Example/Q1106/3#0##_5005bc588cbc65273b9c8d9b96bf5c01"
+ ]
+ }
+ }
+ ],
+ "settings": {
+ "smwStrictComparators": false,
+ "wgContLang": "en",
+ "wgLang": "en"
+ },
+ "meta": {
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+} \ No newline at end of file