summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0452.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0452.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0452.json71
1 files changed, 71 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0452.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0452.json
new file mode 100644
index 00000000..19ff7390
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0452.json
@@ -0,0 +1,71 @@
+{
+ "description": "Test in-text `_txt` datatype in combination with an \"Allows value\" output (#2342, `wgContLang=en`, `wgLang=en`)",
+ "setup": [
+ {
+ "page": "Has text",
+ "namespace":"SMW_NS_PROPERTY",
+ "contents": "[[Has type::Text]], [[Allows value::Doe]]"
+ },
+ {
+ "page": "Example/P0452/1",
+ "namespace":"NS_MAIN",
+ "contents": "[[Has text::Doe]]"
+ },
+ {
+ "page": "Example/P0452/2",
+ "namespace":"NS_MAIN",
+ "contents": "[[Has text::Do]]"
+ }
+ ],
+ "tests": [
+ {
+ "type": "parser",
+ "about": "#0 test output of the valid [[Has text::Doe]] annotation",
+ "subject": "Example/P0452/1",
+ "assert-output": {
+ "to-contain": [
+ "Doe"
+ ]
+ }
+ },
+ {
+ "type": "parser",
+ "about": "#1 (1.31-) test output of the invalid [[Has text::Do]] annotation",
+ "skip-on": {
+ "mediawiki": [ ">1.30.x", "MediaWiki changed the HTML Tidy" ]
+ },
+ "subject": "Example/P0452/2",
+ "assert-output": {
+ "to-contain": [
+ "Do<span class=\"smw-highlighter\" data-type=\"4\" data-state=\"inline\" data-title=\"Warning\" title=\"&quot;Do&quot; is not in the list (Doe) of allowed values for the &quot;Has text&quot; property.\">"
+ ]
+ }
+ },
+ {
+ "type": "parser",
+ "about": "#1 (1.31+) test output of the invalid [[Has text::Do]] annotation",
+ "skip-on": {
+ "mediawiki": [ "<1.30.x", "MediaWiki changed the HTML Tidy" ]
+ },
+ "subject": "Example/P0452/2",
+ "assert-output": {
+ "to-contain": [
+ "Do<span class=\"smw-highlighter\" data-type=\"4\" data-state=\"inline\" data-title=\"Warning\" title=\"&quot;Do&quot; is not in the list (Doe) of allowed values for the &quot;Has text&quot; property.\">"
+ ]
+ }
+ }
+ ],
+ "settings": {
+ "wgContLang": "en",
+ "wgLang": "en",
+ "smwgNamespacesWithSemanticLinks": {
+ "NS_MAIN": true,
+ "SMW_NS_PROPERTY": true
+ }
+ },
+ "meta": {
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+}