{
	"description": "Test inverted printout offset/limit/order",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has page",
			"contents": "[[Has type::Page]]"
		},
		{
			"page": "Q0626",
			"contents": "[[Category:Q0626]]"
		},
		{
			"page": "Q0626/1",
			"contents": "[[Has page::Q0626]]"
		},
		{
			"page": "Q0626/2",
			"contents": "[[Has page::Q0626]]"
		},
		{
			"page": "Q0626/3",
			"contents": "[[Has page::Q0626]]"
		},
		{
			"page": "Q0626/A",
			"contents": "[[Has page::Q0626]]"
		},
		{
			"page": "Q0626/B",
			"contents": "[[Has page::Q0626]]"
		},
		{
			"page": "Q0626/C",
			"contents": "[[Has page::Q0626]]"
		},
		{
			"page": "Q0626/D",
			"contents": "[[Has page::Q0626]]"
		},
		{
			"page": "Q0626/E",
			"contents": "[[Has page::Q0626]]"
		}
	],
	"tests": [
		{
			"type": "query",
			"about": "#0 (entire list)",
			"condition": "[[Category:Q0626]]",
			"printouts": [
				[ "-Has page", { "order": "desc" } ]
			],
			"parameters": {
				"limit": "10",
				"sort": { "": "asc" }
			},
			"assert-queryresult": {
				"count": "1",
				"results": [
					"Q0626#0##"
				],
				"check-sorting": true,
				"dataitems": [
					{
						"type": "_wpg",
						"value": "Q0626/E#0##"
					},
					{
						"type": "_wpg",
						"value": "Q0626/D#0##"
					},
					{
						"type": "_wpg",
						"value": "Q0626/C#0##"
					},
					{
						"type": "_wpg",
						"value": "Q0626/B#0##"
					},
					{
						"type": "_wpg",
						"value": "Q0626/A#0##"
					},
					{
						"type": "_wpg",
						"value": "Q0626/3#0##"
					},
					{
						"type": "_wpg",
						"value": "Q0626/2#0##"
					},
					{
						"type": "_wpg",
						"value": "Q0626/1#0##"
					}
				]
			}
		},
		{
			"type": "query",
			"about": "#1 (limit, offset, desc)",
			"condition": "[[Category:Q0626]]",
			"printouts": [
				[ "-Has page", { "order": "desc", "limit": 3, "offset": 2 } ]
			],
			"parameters": {
				"limit": "10",
				"sort": { "": "asc" }
			},
			"assert-queryresult": {
				"count": "1",
				"results": [
					"Q0626#0##"
				],
				"check-sorting": true,
				"dataitems": [
					{
						"type": "_wpg",
						"value": "Q0626/C#0##"
					},
					{
						"type": "_wpg",
						"value": "Q0626/B#0##"
					},
					{
						"type": "_wpg",
						"value": "Q0626/A#0##"
					}
				]
			}
		},
		{
			"type": "query",
			"about": "#2 (limit, offset, asc)",
			"condition": "[[Category:Q0626]]",
			"printouts": [
				[ "-Has page", { "order": "asc", "limit": 3, "offset": 2 } ]
			],
			"parameters": {
				"limit": "10",
				"sort": { "": "asc" }
			},
			"assert-queryresult": {
				"count": "1",
				"results": [
					"Q0626#0##"
				],
				"check-sorting": true,
				"dataitems": [
					{
						"type": "_wpg",
						"value": "Q0626/3#0##"
					},
					{
						"type": "_wpg",
						"value": "Q0626/A#0##"
					},
					{
						"type": "_wpg",
						"value": "Q0626/B#0##"
					}
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLang": "en",
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true
		},
		"smwgPageSpecialProperties": [
			"_MDAT"
		]
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}