summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1002.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1002.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1002.json167
1 files changed, 167 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1002.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1002.json
new file mode 100644
index 00000000..7bfa5183
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1002.json
@@ -0,0 +1,167 @@
+{
+ "description": "Test `_dat` range for non strict comparators (#285, `smwStrictComparators=false`, skip virtuoso)",
+ "setup": [
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has date",
+ "contents": "[[Has type::Date]]"
+ },
+ {
+ "page": "Example/1002/10-Jan",
+ "contents": "[[Category:Date range]] [[Has date::10 Jan 1970]]"
+ },
+ {
+ "page": "Example/1002/12-Jan",
+ "contents": "[[Category:Date range]] [[Has date::12 Jan 1970]]"
+ },
+ {
+ "page": "Example/1002/20-Jan",
+ "contents": "[[Category:Date range]] [[Has date::20 Jan 1970]]"
+ }
+ ],
+ "tests": [
+ {
+ "type": "query",
+ "about": "#0 greater than, equal to (non strict)",
+ "condition": "[[Category:Date range]] [[Has date::>10 Jan 1970]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 3,
+ "results": [
+ "Example/1002/10-Jan#0##",
+ "Example/1002/12-Jan#0##",
+ "Example/1002/20-Jan#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#1 greater than, equal to",
+ "condition": "[[Category:Date range]] [[Has date::≥10 Jan 1970]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 3,
+ "results": [
+ "Example/1002/10-Jan#0##",
+ "Example/1002/12-Jan#0##",
+ "Example/1002/20-Jan#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#2 greater than",
+ "condition": "[[Category:Date range]] [[Has date::>>10 Jan 1970]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 2,
+ "results": [
+ "Example/1002/12-Jan#0##",
+ "Example/1002/20-Jan#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#3",
+ "condition": "[[Category:Date range]] [[Has date::>11 Jan 1970]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 2,
+ "results": [
+ "Example/1002/12-Jan#0##",
+ "Example/1002/20-Jan#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#4 smaller than, equal to (non strict)",
+ "condition": "[[Category:Date range]] [[Has date::<20 Jan 1970]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 3,
+ "results": [
+ "Example/1002/10-Jan#0##",
+ "Example/1002/12-Jan#0##",
+ "Example/1002/20-Jan#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#5 smaller than, equal to",
+ "condition": "[[Category:Date range]] [[Has date::≤20 Jan 1970]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 3,
+ "results": [
+ "Example/1002/10-Jan#0##",
+ "Example/1002/12-Jan#0##",
+ "Example/1002/20-Jan#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#6 smaller than",
+ "condition": "[[Category:Date range]] [[Has date::<<20 Jan 1970]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 2,
+ "results": [
+ "Example/1002/10-Jan#0##",
+ "Example/1002/12-Jan#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#7",
+ "condition": "[[Category:Date range]] [[Has date::<19 Jan 1970]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 2,
+ "results": [
+ "Example/1002/10-Jan#0##",
+ "Example/1002/12-Jan#0##"
+ ]
+ }
+ }
+ ],
+ "settings": {
+ "smwStrictComparators": false
+ },
+ "meta": {
+ "skip-on": {
+ "virtuoso": "Virtuoso 6.1 rdfs / subproperty/subcategory hierarchies are not supported"
+ },
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+} \ No newline at end of file