summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0701.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0701.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0701.json186
1 files changed, 186 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0701.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0701.json
new file mode 100644
index 00000000..8d81e881
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0701.json
@@ -0,0 +1,186 @@
+{
+ "description": "Test `_uri` with some annotation/search pattern (T45264, #679)",
+ "setup": [
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has url",
+ "contents": "[[Has type::URL]]"
+ },
+ {
+ "page": "Page-with-url-1",
+ "contents": "[[Has url::http://example.org/aaa/bbb#ccc]]"
+ },
+ {
+ "page": "Page-with-url-2",
+ "contents": "[[Has url::http://acme.test/api?query=!_:;@* #Foo&=%20-3DBar]]"
+ },
+ {
+ "page": "Page-with-url-3",
+ "contents": "[[Has url::http://example.org/ようこそ#-{}]]"
+ }
+ ],
+ "tests": [
+ {
+ "type": "query",
+ "about": "#0",
+ "condition": "[[Has url::http://example.org/aaa/bbb#ccc]]",
+ "printouts": [
+ "Has url"
+ ],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": "1",
+ "results": [
+ "Page-with-url-1#0##"
+ ],
+ "datavalues": [
+ {
+ "property": "Has url",
+ "value": "http://example.org/aaa/bbb#ccc"
+ }
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#1",
+ "condition": "[[Has url::http://acme.test/api?query=!_:;@*_#Foo&=_-3DBar]]",
+ "printouts": [
+ "Has url"
+ ],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": "1",
+ "results": [
+ "Page-with-url-2#0##"
+ ],
+ "datavalues": [
+ {
+ "property": "Has url",
+ "value": "http://acme.test/api?query=%21_:%3B@%2A_#Foo&=_-3DBar"
+ }
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#2",
+ "condition": "[[Has url::~*example.org/*]]",
+ "printouts": [
+ "Has url"
+ ],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 2,
+ "results": [
+ "Page-with-url-1#0##",
+ "Page-with-url-3#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#3",
+ "condition": "[[Has url::~*ccc*]]",
+ "printouts": [
+ "Has url"
+ ],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": "1",
+ "results": [
+ "Page-with-url-1#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#4",
+ "condition": "[[Has url::~http://*query=*]]",
+ "printouts": [
+ "Has url"
+ ],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": "1",
+ "results": [
+ "Page-with-url-2#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#5",
+ "condition": "[[Has url::~http://*query=*]] OR [[Has url::~*ccc*]]",
+ "printouts": [
+ "Has url"
+ ],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": "2",
+ "results": [
+ "Page-with-url-1#0##",
+ "Page-with-url-2#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#6",
+ "condition": "[[Has url::http://example.org/ようこそ#-{}]]",
+ "printouts": [
+ "Has url"
+ ],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": "1",
+ "results": [
+ "Page-with-url-3#0##"
+ ],
+ "datavalues": [
+ {
+ "property": "Has url",
+ "value": "http://example.org/%E3%82%88%E3%81%86%E3%81%93%E3%81%9D#-%7B%7D"
+ }
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#7",
+ "condition": "[[Has url::http://example.org/%E3%82%88%E3%81%86%E3%81%93%E3%81%9D#-%7B%7D]]",
+ "printouts": [
+ "Has url"
+ ],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": "1",
+ "results": [
+ "Page-with-url-3#0##"
+ ]
+ }
+ }
+ ],
+ "settings": [],
+ "meta": {
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+} \ No newline at end of file