summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0503.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0503.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0503.json106
1 files changed, 106 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0503.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0503.json
new file mode 100644
index 00000000..9a908ac9
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0503.json
@@ -0,0 +1,106 @@
+{
+ "description": "Test in-text annotation `_uri` on valid/invalid scheme/path",
+ "setup": [
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has url",
+ "contents": "[[Has type::URL]]"
+ },
+ {
+ "page": "Example/P0503/1",
+ "contents": "[[Has url::ftp://example.com/foo]]"
+ },
+ {
+ "page": "Example/P0503/2",
+ "contents": "[[Has url::User:Test]]"
+ },
+ {
+ "page": "Example/P0503/3",
+ "contents": "[[Has url::http:///]]"
+ },
+ {
+ "page": "Example/P0503/Q.1",
+ "contents": "{{#ask: [[Has url::User:Test]] |default=No result }}"
+ }
+ ],
+ "tests": [
+ {
+ "type": "parser",
+ "about": "#0 valid ftp",
+ "subject": "Example/P0503/1",
+ "assert-store": {
+ "semantic-data": {
+ "strictPropertyValueMatch": false,
+ "propertyCount": 3,
+ "propertyKeys": [
+ "_SKEY",
+ "_MDAT",
+ "Has url"
+ ],
+ "propertyValues": [
+ "ftp://example.com/foo"
+ ]
+ }
+ }
+ },
+ {
+ "type": "parser",
+ "about": "#1 invalid User:",
+ "subject": "Example/P0503/2",
+ "assert-store": {
+ "semantic-data": {
+ "strictPropertyValueMatch": false,
+ "propertyCount": 3,
+ "propertyKeys": [
+ "_SKEY",
+ "_MDAT",
+ "_ERRC"
+ ]
+ }
+ }
+ },
+ {
+ "type": "parser",
+ "about": "#2 (allow invalid scheme in query context)",
+ "subject": "Example/P0503/Q.1",
+ "assert-output": {
+ "to-contain": [
+ "No result"
+ ],
+ "not-contain": [
+ "<span class=\"smw-highlighter\" data-type=\"4\" data-state=\"inline\""
+ ]
+ }
+ },
+ {
+ "type": "parser",
+ "about": "#3 invalid path `///`",
+ "subject": "Example/P0503/3#_ERRd3ce18ed907900b1ec8f6a2b7bce6aea",
+ "assert-store": {
+ "semantic-data": {
+ "strictPropertyValueMatch": false,
+ "propertyCount": 3,
+ "propertyKeys": [
+ "_SKEY",
+ "_ERRT",
+ "_ERRP"
+ ],
+ "propertyValues": [
+ "\"http:///\" has been idendified to contain an invalid \"/\" authority or path component."
+ ]
+ }
+ }
+ }
+ ],
+ "settings": {
+ "wgContLang": "en",
+ "smwgPageSpecialProperties": [
+ "_MDAT"
+ ]
+ },
+ "meta": {
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+} \ No newline at end of file