summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1106.json
blob: 0e1c0bddb1e630dfe00ce6f56f5a65b0f7c6103e (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
{
	"description": "Test `_rec` with `~/!~` comparators on allowed values (#1207, `smwStrictComparators=false`)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has restricted status record",
			"contents": "[[Has type::Text]] [[Allows value::open]], [[Allows value::closed]], [[Allows value::in progress]]"
		},
		{
			"page": "Example/Q1106/1",
			"contents": "[[Category:E-Q1106]][[Has restricted status record::open]]"
		},
		{
			"page": "Example/Q1106/2",
			"contents": "[[Category:E-Q1106]]{{#set:Has restricted status record=closed}}"
		},
		{
			"page": "Example/Q1106/3",
			"contents": "{{#subobject:Has restricted status record=in progress|@category=E-Q1106}}"
		},
		{
			"page": "Example/Q1106/4",
			"contents": "[[Category:E-Q1106]][[Has restricted status record::none of the above]]"
		}
	],
	"tests": [
		{
			"type": "query",
			"about": "#0 like *en*",
			"condition": "[[Category:E-Q1106]][[Has restricted status record::~*en*]]",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 1,
				"results": [
					"Example/Q1106/1#0##"
				]
			}
		},
		{
			"type": "query",
			"about": "#1 like cl*",
			"condition": "[[Category:E-Q1106]][[Has restricted status record::~cl*]]",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 1,
				"results": [
					"Example/Q1106/2#0##"
				]
			}
		},
		{
			"type": "query",
			"about": "#2 not like cl*",
			"condition": "[[Category:E-Q1106]][[Has restricted status record::!~cl*]]",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Example/Q1106/1#0##",
					"Example/Q1106/3#0##_5005bc588cbc65273b9c8d9b96bf5c01"
				]
			}
		},
		{
			"type": "query",
			"about": "#3 not like cl* AND *in*",
			"condition": "[[Category:E-Q1106]]<q>[[Has restricted status record::!~cl*]] AND [[Has restricted status record::!~*in*]]</q>",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 1,
				"results": [
					"Example/Q1106/1#0##"
				]
			}
		},
		{
			"type": "query",
			"about": "#4 not like cl* OR *in* (doesn't make much sense, we test it anyway)",
			"condition": "[[Category:E-Q1106]]<q>[[Has restricted status record::!~cl*]] OR [[Has restricted status record::!~*in*]]</q>",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 3,
				"results": [
					"Example/Q1106/1#0##",
					"Example/Q1106/2#0##",
					"Example/Q1106/3#0##_5005bc588cbc65273b9c8d9b96bf5c01"
				]
			}
		}
	],
	"settings": {
		"smwStrictComparators": false,
		"wgContLang": "en",
		"wgLang": "en"
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}