summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0449.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0449.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0449.json156
1 files changed, 156 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0449.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0449.json
new file mode 100644
index 00000000..7b7f24d1
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0449.json
@@ -0,0 +1,156 @@
+{
+ "description": "Test in-text legacy `:=` and `::` annotation style with enabled links in values (#2153, `wgContLang=en`)",
+ "setup": [
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has text",
+ "contents": "[[Has type::Text]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has page",
+ "contents": "[[Has type::Page]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has number",
+ "contents": "[[Has type::Number]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has date",
+ "contents": "[[Has type::Date]]"
+ },
+ {
+ "page": "Example/P0449/2",
+ "contents": "[[Has text:=[[Lorem ipsum]]]]"
+ },
+ {
+ "page": "Example/P0449/3",
+ "contents": "[[Has text:=[http://example.org/eleifend eleifend]]] [[Has text::[http://example.org/eleifend eleifend]]]"
+ },
+ {
+ "page": "Example/P0449/4",
+ "contents": "[[Has text:=[[Has number:=42]] [[Has number::1001]]]] [[Category:P0449]]"
+ },
+ {
+ "page": "Example/P0449/Q.1",
+ "contents": "{{#ask: [[Category:P0449]] |format=embedded }}"
+ }
+ ],
+ "tests": [
+
+ {
+ "type": "parser",
+ "about": "#1 internal wiki link",
+ "subject": "Example/P0449/2",
+ "assert-store": {
+ "semantic-data": {
+ "strictPropertyValueMatch": false,
+ "propertyCount": 3,
+ "propertyKeys": [
+ "_SKEY",
+ "_MDAT",
+ "Has text"
+ ],
+ "propertyValues": [
+ "[[Lorem ipsum]]"
+ ]
+ }
+ },
+ "assert-output": {
+ "to-contain": [
+ ">Lorem ipsum</a>"
+ ]
+ }
+ },
+ {
+ "type": "parser",
+ "about": "#2 external link",
+ "subject": "Example/P0449/3",
+ "assert-store": {
+ "semantic-data": {
+ "strictPropertyValueMatch": false,
+ "propertyCount": 3,
+ "propertyKeys": [
+ "_SKEY",
+ "_MDAT",
+ "Has text"
+ ],
+ "propertyValues": [
+ "[http://example.org/eleifend eleifend]"
+ ]
+ }
+ },
+ "assert-output": {
+ "to-contain": [
+ ">eleifend</a>"
+ ],
+ "not-contain": [
+ "[[Has text::<a rel=\"nofollow\" class=\"external text\" href=\"http://example.org/eleifend\">eleifend</a>]]"
+ ]
+ }
+ },
+ {
+ "type": "parser",
+ "about": "#3 link-in annotation",
+ "subject": "Example/P0449/4",
+ "assert-store": {
+ "semantic-data": {
+ "strictPropertyValueMatch": false,
+ "propertyCount": 5,
+ "propertyKeys": [
+ "_SKEY",
+ "_MDAT",
+ "_INST",
+ "Has text",
+ "Has number"
+ ],
+ "propertyValues": [
+ "42",
+ "1001"
+ ]
+ }
+ },
+ "assert-output": {
+ "to-contain": [
+ "42 1001"
+ ]
+ }
+ },
+ {
+ "type": "parser",
+ "about": "#4 embbeded format to verify that [[SMW::OFF]]/[[SMW:ON]] remain after transclusion",
+ "subject": "Example/P0449/Q.1",
+ "assert-store": {
+ "semantic-data": {
+ "strictPropertyValueMatch": false,
+ "propertyCount": 3,
+ "propertyKeys": [
+ "_SKEY",
+ "_MDAT",
+ "_ASK"
+ ],
+ "propertyValues": []
+ }
+ }
+ }
+ ],
+ "settings": {
+ "wgContLang": "en",
+ "smwgParserFeatures": [
+ "SMW_PARSER_STRICT",
+ "SMW_PARSER_INL_ERROR",
+ "SMW_PARSER_HID_CATS",
+ "SMW_PARSER_LINV"
+ ],
+ "smwgPageSpecialProperties": [
+ "_MDAT"
+ ]
+ },
+ "meta": {
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+} \ No newline at end of file