summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1101.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1101.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1101.json189
1 files changed, 189 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1101.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1101.json
new file mode 100644
index 00000000..ed2a11fa
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1101.json
@@ -0,0 +1,189 @@
+{
+ "description": "Test _rec for non strict comparators queries (`smwStrictComparators=false`)",
+ "setup": [
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has title",
+ "contents": "[[Has type::Page]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has year",
+ "contents": "[[Has type::Date]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has population",
+ "contents": "[[Has type::Number]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has area",
+ "contents": "[[Has type::Quantity]] [[Corresponds to::1 km²]] [[Corresponds to::1000 m²]] [[Corresponds to::988.42153133973 rood]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Population density",
+ "contents": "[[Has type::Record]] [[Has fields::Has population;Has area]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Book record",
+ "contents": "[[Has type::Record]] [[Has fields::Has title;Has year]]"
+ },
+ {
+ "page": "Example/1101/City A",
+ "contents": "[[Category:Record example]] [[Population density::3900;1 km²]]"
+ },
+ {
+ "page": "Example/1101/City B",
+ "contents": "[[Category:Record example]] [[Population density::20169;1 km²]]"
+ },
+ {
+ "page": "Example/1101/Book A",
+ "contents": "[[Category:Record example]] [[Book record::Title with $&%'\\;* special characters ; 2001]]"
+ },
+ {
+ "page": "Example/1101/Book B",
+ "contents": "[[Category:Record example]] [[Book record::Book B; 2000]]"
+ },
+ {
+ "page": "Example/1101/Book C",
+ "contents": "[[Category:Record example]] [[Book record::Book C;30 Dec 2001]]"
+ },
+ {
+ "page": "Example/1101/Book D",
+ "contents": "[[Category:Record example]] [[Book record::Book D;1900]]"
+ }
+ ],
+ "tests": [
+ {
+ "type": "query",
+ "about": "#0 distinct value search",
+ "condition": "[[Category:Record example]] [[Population density::3900;1 km²]]",
+ "printouts": [
+ "Population density"
+ ],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 1,
+ "results": [
+ "Example/1101/City A#0##"
+ ],
+ "datavalues": [
+ {
+ "property": "Population_density",
+ "value": "3900;1 km²"
+ }
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#1, T23926 RecordsToContainSpecialCharactersCausedByHtmlEncoding",
+ "condition": "[[Category:Record example]] [[Book record::Title with $&%'\\;* special characters ; 2001]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 1,
+ "results": [
+ "Example/1101/Book A#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#2, T36019 RecordToContainFieldComparator",
+ "condition": "[[Category:Record example]] [[Book record::?;<30 Dec 2001]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 4,
+ "results": [
+ "Example/1101/Book A#0##",
+ "Example/1101/Book B#0##",
+ "Example/1101/Book C#0##",
+ "Example/1101/Book D#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#3",
+ "condition": "[[Category:Record example]] [[Book record::?;<1901]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 1,
+ "results": [
+ "Example/1101/Book D#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#4",
+ "condition": "[[Category:Record example]] [[Book record::?;>30 Dec 2001]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 1,
+ "results": [
+ "Example/1101/Book C#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#5",
+ "condition": "[[Category:Record example]] [[Book record::?;>1901]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 3,
+ "results": [
+ "Example/1101/Book A#0##",
+ "Example/1101/Book B#0##",
+ "Example/1101/Book C#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#6",
+ "condition": "[[Category:Record example]] [[Book record::?;!2001]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 3,
+ "results": [
+ "Example/1101/Book B#0##",
+ "Example/1101/Book C#0##",
+ "Example/1101/Book D#0##"
+ ]
+ }
+ }
+ ],
+ "settings": {
+ "smwStrictComparators": false
+ },
+ "meta": {
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+} \ No newline at end of file