gplx/mediawiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1004.json

175 lines
5.2 KiB
JSON

{
"description": "Test `_dat` range for `~`/`!~` comparators (#1178, `smwStrictComparators=false`, skip virtuoso)",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has date",
"contents": "[[Has type::Date]]"
},
{
"page": "Example/1004/15-Jun",
"contents": "{{#subobject:|@category=E-1004|Has date=15 Jun 2011 17:59:59}}{{#subobject:|@category=E-1004|Has date=15 Jun 2011 18:53}}{{#subobject:|@category=E-1004|Has date=15 Jun 2011 18:43}}{{#subobject:|@category=E-1004|Has date=15 Jun 2011 19:53}}"
},
{
"page": "Example/1004/16-Jun",
"contents": "{{#subobject:|@category=E-1004|Has date=16 Jul 2011 19:53}}"
},
{
"page": "Example/1004/17-Jun",
"contents": "{{#subobject:|@category=E-1004|Has date=17 Jun 2011 19:53:05}}{{#subobject:|@category=E-1004|Has date=17 Jun 2011 19:53:15}}{{#subobject:|@category=E-1004|Has date=17 Jun 2011 19:53:07}}{{#subobject:|@category=E-1004|Has date=17 Jun 2011 19:54:07}}"
},
{
"page": "Example/1004/17-Jun-1356",
"contents": "{{#subobject:|@category=E-1004|Has date=17 Jun 1356 19:53:05}}{{#subobject:|@category=E-1004|Has date=17 Jun 1356 19:53:15}}{{#subobject:|@category=E-1004|Has date=17 Jun 1356 19:53:07}}{{#subobject:|@category=E-1004|Has date=17 Jun 1356 19:54:07}}"
}
],
"tests": [
{
"type": "query",
"about": "#0 for the same hour",
"condition": "[[Category:E-1004]] [[Has date::~15 Jun 2011 18:00]]",
"printouts": [],
"parameters": {
"limit": "10"
},
"assert-queryresult": {
"count": 2,
"results": [
"Example/1004/15-Jun#0##_3ac75bf67c06e184b53c2fe47dc9838f",
"Example/1004/15-Jun#0##_25fd2aa8d8bc9c7fe64f1161beb1e53e"
]
}
},
{
"type": "query",
"about": "#1 for the same day",
"condition": "[[Category:E-1004]] [[Has date::~15 Jun 2011]]",
"printouts": [],
"parameters": {
"limit": "10"
},
"assert-queryresult": {
"count": 4,
"results": [
"Example/1004/15-Jun#0##_3ac75bf67c06e184b53c2fe47dc9838f",
"Example/1004/15-Jun#0##_25fd2aa8d8bc9c7fe64f1161beb1e53e",
"Example/1004/15-Jun#0##_42f6ee5000aee48058fef6e89d988122",
"Example/1004/15-Jun#0##_93e03330595abc209f006bd389af97ca"
]
}
},
{
"type": "query",
"about": "#2 for the same month",
"condition": "[[Category:E-1004]] [[Has date::~ Jun 2011]]",
"printouts": [],
"parameters": {
"limit": "10"
},
"assert-queryresult": {
"count": 8,
"results": [
"Example/1004/15-Jun#0##_3ac75bf67c06e184b53c2fe47dc9838f",
"Example/1004/15-Jun#0##_25fd2aa8d8bc9c7fe64f1161beb1e53e",
"Example/1004/15-Jun#0##_42f6ee5000aee48058fef6e89d988122",
"Example/1004/15-Jun#0##_93e03330595abc209f006bd389af97ca",
"Example/1004/17-Jun#0##_546d85f0e65445d6ddebc327d82bc9b4",
"Example/1004/17-Jun#0##_d6ae457c1063eb3280a01617e331ae16",
"Example/1004/17-Jun#0##_97d8169c6bcb5357c7d4ed617de6b683",
"Example/1004/17-Jun#0##_2321a4ca8cce9a9f1200e7bcc6530b32"
]
}
},
{
"type": "query",
"about": "#3 not for the same month",
"condition": "[[Category:E-1004]] [[Has date::~ 2011]] [[Has date::!~ Jun 2011]]",
"printouts": [],
"parameters": {
"limit": "10"
},
"assert-queryresult": {
"count": 1,
"results": [
"Example/1004/16-Jun#0##_c13e26365fd030c4505450df0da097ca"
]
}
},
{
"type": "query",
"about": "#4 for the same minute",
"condition": "[[Category:E-1004]] [[Has date::~ 17 Jun 2011 19:53 ]]",
"printouts": [],
"parameters": {
"limit": "10"
},
"assert-queryresult": {
"count": 3,
"results": [
"Example/1004/17-Jun#0##_546d85f0e65445d6ddebc327d82bc9b4",
"Example/1004/17-Jun#0##_d6ae457c1063eb3280a01617e331ae16",
"Example/1004/17-Jun#0##_97d8169c6bcb5357c7d4ed617de6b683"
]
}
},
{
"type": "query",
"about": "#5 not for the same minute",
"condition": "[[Category:E-1004]] [[Has date::~ 17 Jun 2011 19:00]] [[Has date::!~ 17 Jun 2011 19:53]]",
"printouts": [],
"parameters": {
"limit": "10"
},
"assert-queryresult": {
"count": 1,
"results": [
"Example/1004/17-Jun#0##_2321a4ca8cce9a9f1200e7bcc6530b32"
]
}
},
{
"type": "query",
"about": "#6 for the same sec",
"condition": "[[Category:E-1004]] [[Has date::~ 17 Jun 2011 19:53:05 ]]",
"printouts": [],
"parameters": {
"limit": "10"
},
"assert-queryresult": {
"count": 1,
"results": [
"Example/1004/17-Jun#0##_546d85f0e65445d6ddebc327d82bc9b4"
]
}
},
{
"type": "query",
"about": "#7 for the same year",
"condition": "[[Category:E-1004]] [[Has date::!~ 2011 ]]",
"printouts": [],
"parameters": {
"limit": "10"
},
"assert-queryresult": {
"count": 4,
"results": [
"Example/1004/17-Jun-1356#0##_4034c283fdf86e4170912b3c85c970e8",
"Example/1004/17-Jun-1356#0##_c649d0effa6cd11dd6a4def82ac6523f",
"Example/1004/17-Jun-1356#0##_b080b00743a9e79d619f417b2268156f",
"Example/1004/17-Jun-1356#0##_af39ab3a77d159be5d8f2a1ddfc72d37"
]
}
}
],
"settings": {
"smwStrictComparators": false
},
"meta": {
"skip-on": {
"virtuoso": "Virtuoso 6.1 somwhow fails for >/>>"
},
"version": "2",
"is-incomplete": false,
"debug": false
}
}