summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0411.json
blob: 26f07d3340f1a2675380676a2e8264bd428af985 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{
	"description": "Test in-text annotation (and #subobject) using a monolingual property (#1344, en)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has text with language",
			"contents": "[[Has type::Monolingual text]]"
		},
		{
			"page": "Example/P0411/1",
			"contents": "[[Has text with language::example one@en]]"
		},
		{
			"page": "Example/P0411/1/1",
			"contents": "{{#ask: [[Has text with language::example one@en]] |?Has text with language }}"
		},
		{
			"page": "Example/P0411/1/2",
			"contents": "{{#ask: [[-Has text with language::Example/P0411/1]] |?Language code |?Text }}"
		},
		{
			"page": "Example/P0411/2",
			"contents": "{{#subobject: |Has text with language=例の一@ja }} {{#subobject: |Has text with language=pour l'exemple@fr }}"
		},
		{
			"page": "Example/P0411/2/1",
			"contents": "{{#ask: [[Has text with language::?@ja]] |?Has text with language }}"
		},
		{
			"page": "Example/P0411/2/2",
			"contents": "{{#ask: [[Language code::ja]] |?Text }}"
		},
		{
			"page": "Example/P0411/2/3",
			"contents": "{{#ask: [[Language code::ja]] |?-Has text with language }}"
		},
		{
			"page": "Example/P0411/3",
			"contents": "{{#subobject: |Has text with language=国@zh-hans }} {{#subobject: |Has text with language=國@zh-hant }}"
		},
		{
			"page": "Example/P0411/3/1",
			"contents": "{{#ask: [[Has text with language::?@~zh*]] |?Has text with language=Text |+index=1 |?Has text with language=Code |+index=2 }}"
		}
	],
	"tests": [
		{
			"type": "parser",
			"about": "#0",
			"subject": "Example/P0411/1",
			"assert-store": {
				"semantic-data": {
					"strictPropertyValueMatch": false,
					"propertyCount": 3,
					"propertyKeys": [
						"Has_text_with_language",
						"_SKEY",
						"_MDAT"
					],
					"propertyValues": []
				}
			},
			"assert-output": {
				"to-contain": [
					"example one (en)"
				]
			}
		},
		{
			"type": "parser",
			"about": "#1 match subject",
			"subject": "Example/P0411/1/1",
			"assert-output": {
				"to-contain": [
					"Example/P0411/1",
					"class=\"Has-text-with-language smwtype_mlt_rec\">example one (en)"
				]
			}
		},
		{
			"type": "parser",
			"about": "#2 inverse match",
			"subject": "Example/P0411/1/2",
			"assert-output": {
				"to-contain": [
					"Example/P0411/1#_ML3c1364d804527cd1594b4817b01c29f0",
					"class=\"Language-code smwtype__lcode\">en",
					"class=\"Text smwtype_txt\">example one"
				]
			}
		},
		{
			"type": "parser",
			"about": "#3 match specific language",
			"subject": "Example/P0411/2/1",
			"assert-output": {
				"to-contain": [
					"Example/P0411/2#_b88331e53ca614aea6f7c8b5f0d6f876",
					"class=\"Has-text-with-language smwtype_mlt_rec\">例の一 (ja)"
				]
			}
		},
		{
			"type": "parser",
			"about": "#4 match specific language",
			"subject": "Example/P0411/2/2",
			"assert-output": {
				"to-contain": [
					"Example/P0411/2#_ML13e9d4c2ba826927d7210acab7def9ec",
					"class=\"Text smwtype_txt\">例の一"
				]
			}
		},
		{
			"type": "parser",
			"about": "#5 match specific language with inverse printout",
			"subject": "Example/P0411/2/3",
			"assert-output": {
				"to-contain": [
					"Example/P0411/2#_ML13e9d4c2ba826927d7210acab7def9ec",
					"title=\"Property:Has text with language\">-Has text with language",
					"class=\"-Has-text-with-language smwtype_mlt_rec\">Example/P0411/2"
				]
			}
		},
		{
			"type": "parser",
			"about": "#6 using index display for columns",
			"subject": "Example/P0411/3/1",
			"assert-output": {
				"to-contain": [
					"Example/P0411/3#_a52273132da28d0c1fad5819e44958ab",
					"class=\"Text smwtype_txt\">国",
					"class=\"Code smwtype__lcode\">zh-Hans",
					"Example/P0411/3#_4eac5791ab0478bb01dc9d181bc91ec8",
					"class=\"Text smwtype_txt\">國",
					"class=\"Code smwtype__lcode\">zh-Hant"
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLang": "en"
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}