summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1102.json
blob: 854b954a0ec203f8f16e6e41261b01bf25febcd0 (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
{
	"description": "Test `_rec` queries in combination with `_dat` `~/!~` search pattern (#1178, `smwStrictComparators=false`, skip virtuoso)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has status",
			"contents": "[[Has type::Text]] [[Allows value::open]] [[Allows value::closed]] [[Allows value::in progress]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has date",
			"contents": "[[Has type::Date]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has status record",
			"contents": "[[Has type::Record]] [[Has fields::Has date; Has status]]"
		},
		{
			"page": "Example/1102/15-Dec-2007",
			"contents": "{{#subobject:|@category=E-1102|Has status record=15 Dec 2007;closed}}{{#subobject:|@category=E-1102 |Has status record=15 Dec 2007;open}}"
		},
		{
			"page": "Example/1102/16-Dec-2007",
			"contents": "{{#subobject:|@category=E-1102 |Has status record=16 Dec 2007;closed}}"
		},
		{
			"page": "Example/1102/345-BC",
			"contents": "{{#subobject:|@category=E-1102|Has status record=345 BC;closed}}"
		}
	],
	"tests": [
		{
			"type": "query",
			"about": "#0 disjunctive match for any status",
			"condition": "[[Category:E-1102]] [[Has status record::~Dec 2007;?]] OR [[Has status record::~345 BC;?]]",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 4,
				"results": [
					"Example/1102/15-Dec-2007#0##_32971b257b2cfa9a364ae22e21ab4adf",
					"Example/1102/15-Dec-2007#0##_a95f61c99770cf350f1388ae46e973bb",
					"Example/1102/16-Dec-2007#0##_f1fd6537c6d2576390a45ba86e58ed5b",
					"Example/1102/345-BC#0##_6f2d86633d90e76f0e9fa5e5d1fe6598"
				]
			}
		},
		{
			"type": "query",
			"about": "#1 all closed in Dec 2007",
			"condition": "[[Category:E-1102]] [[Has status record::~Dec 2007;closed]]",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Example/1102/15-Dec-2007#0##_32971b257b2cfa9a364ae22e21ab4adf",
					"Example/1102/16-Dec-2007#0##_f1fd6537c6d2576390a45ba86e58ed5b"
				]
			}
		},
		{
			"type": "query",
			"about": "#2 all closed not at the 15 Dec 2007",
			"condition": "[[Category:E-1102]] [[Has status record::!~ 15 Dec 2007;closed]]",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Example/1102/16-Dec-2007#0##_f1fd6537c6d2576390a45ba86e58ed5b",
					"Example/1102/345-BC#0##_6f2d86633d90e76f0e9fa5e5d1fe6598"
				]
			}
		}
	],
	"settings": {
		"smwStrictComparators": false
	},
	"meta": {
		"skip-on": {
			"virtuoso": "Virtuoso 6.1 fails for BC"
		},
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}