diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0605.json')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0605.json | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0605.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0605.json new file mode 100644 index 00000000..5a73a9e0 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0605.json @@ -0,0 +1,141 @@ +{ + "description": "Test `_wpg` regex search (`!~/~*/~?`) queries (#679)", + "setup": [ + { + "namespace": "SMW_NS_PROPERTY", + "page": "Has regexpage", + "contents": "[[Has type::Page]]" + }, + { + "page": "Page-1-with-spaces", + "contents": "[[Has regexpage::Annotation test with spaces]]" + }, + { + "page": "Page-2-with-spaces", + "contents": "[[Has regexpage::Annotation text with spaces]]" + }, + { + "page": "Page-3-without-spaces", + "contents": "[[Has regexpage::AnnotationTestWithoutSpaces]]" + } + ], + "tests": [ + { + "type": "query", + "about": "#0", + "condition": "[[Has regexpage::~Annotation te*]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 2, + "results": [ + "Page-1-with-spaces#0##", + "Page-2-with-spaces#0##" + ] + } + }, + { + "type": "query", + "about": "#1", + "condition": "[[Has regexpage::~Annotation tes*]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 1, + "results": [ + "Page-1-with-spaces#0##" + ] + } + }, + { + "type": "query", + "about": "#2", + "condition": "[[Has regexpage::~An??tation*]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 3, + "results": [ + "Page-1-with-spaces#0##", + "Page-2-with-spaces#0##", + "Page-3-without-spaces#0##" + ] + } + }, + { + "type": "query", + "about": "#3", + "condition": "[[Has regexpage::~Annotation*]] [[Has regexpage::!~Annotation tex*]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 2, + "results": [ + "Page-1-with-spaces#0##", + "Page-3-without-spaces#0##" + ] + } + }, + { + "type": "query", + "about": "#4", + "condition": "[[Has regexpage::~Annotation tes*]] OR [[Has regexpage::~Annotation tex*]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 2, + "results": [ + "Page-1-with-spaces#0##", + "Page-2-with-spaces#0##" + ] + } + }, + { + "type": "query", + "about": "#5", + "condition": "[[Has regexpage::~Annotation te?t with spaces]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 2, + "results": [ + "Page-1-with-spaces#0##", + "Page-2-with-spaces#0##" + ] + } + }, + { + "type": "query", + "about": "#6", + "condition": "[[Has regexpage::+]][[Has regexpage::!~Annotation te?t with spaces]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 1, + "results": [ + "Page-3-without-spaces#0##" + ] + } + } + ], + "settings": [], + "meta": { + "version": "2", + "is-incomplete": false, + "debug": false + } +}
\ No newline at end of file |