{
	"description": "Test `format=table` with sep (incl. UL/OL) cell formatting (#495)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has page",
			"contents": "[[Has type::Page]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has text",
			"contents": "[[Has type::Text]]"
		},
		{
			"page": "Test:F0202/1",
			"contents": "[[Has page::Foo]] [[Has page::42]] [[Has text::bar]] [[Has text::1001]]"
		},
		{
			"page": "Test:F0202/Q.1",
			"contents": "{{#ask:[[Has page::Foo]] [[Has page::42]] |?Has page |?Has text|+order=asc |format=table |headers=plain |link=none }}"
		},
		{
			"page": "Test:F0202/Q.2",
			"contents": "{{#ask:[[Has page::Foo]] [[Has page::42]] |?Has page |?Has text|+order=desc |format=table |sep=; |headers=plain |link=none }}"
		},
		{
			"page": "Test:F0202/Q.3",
			"contents": "{{#ask:[[Has page::Foo]] [[Has page::42]] |?Has page |?Has text|+order=asc |format=broadtable |sep=; |headers=plain |link=none }}"
		},
		{
			"page": "Test:F0202/Q.4",
			"contents": "{{#ask:[[Has page::Foo]] [[Has page::42]] |?Has page |?Has text|+order=asc |format=broadtable |sep=UL |headers=plain |link=none }}"
		},
		{
			"page": "Test:F0202/Q.5",
			"contents": "{{#ask:[[Has page::Foo]] [[Has page::42]] |?Has page |?Has text|+order=desc |format=broadtable |sep=ol |headers=plain |link=none }}"
		}
	],
	"tests": [
		{
			"type": "format",
			"about": "#0 table without sep",
			"subject": "Test:F0202/Q.1",
			"assert-output": {
				"to-contain": [
					"<table class=\"sortable wikitable smwtable\">",
					"<th>&#160;</th><th class=\"Has-page\">Has page</th>",
					"<th class=\"Has-text\">Has text</th>",
					"<tr data-row-number=\"1\" class=\"row-odd\"><td class=\"smwtype_wpg\">Test:F0202/1</td>",
					"<td class=\"Has-page smwtype_wpg\">Foo<br />42</td>",
					"<td class=\"Has-text smwtype_txt\" data-sort-value=\"1001\">1001<br />bar</td></tr>",
					"</table>"
				]
			}
		},
		{
			"type": "format",
			"about": "#1 table with sep (;)",
			"subject": "Test:F0202/Q.2",
			"assert-output": {
				"to-contain": [
					"<table class=\"sortable wikitable smwtable\">",
					"<th>&#160;</th><th class=\"Has-page\">Has page</th>",
					"<th class=\"Has-text\">Has text</th>",
					"<tr data-row-number=\"1\" class=\"row-odd\"><td class=\"smwtype_wpg\">Test:F0202/1</td>",
					"<td class=\"Has-page smwtype_wpg\">Foo;42</td>",
					"<td class=\"Has-text smwtype_txt\">bar;1001</td></tr>",
					"</table>"
				]
			}
		},
		{
			"type": "format",
			"about": "#2 broadtable with sep (;)",
			"subject": "Test:F0202/Q.3",
			"assert-output": {
				"to-contain": [
					"<table class=\"sortable wikitable smwtable broadtable\" width=\"100%\">",
					"<th>&#160;</th><th class=\"Has-page\">Has page</th>",
					"<th class=\"Has-text\">Has text</th>",
					"<tr data-row-number=\"1\" class=\"row-odd\"><td class=\"smwtype_wpg\">Test:F0202/1</td>",
					"<td class=\"Has-page smwtype_wpg\">Foo;42</td>",
					"<td class=\"Has-text smwtype_txt\" data-sort-value=\"1001\">1001;bar</td></tr>",
					"</table>"
				]
			}
		},
		{
			"type": "format",
			"about": "#3 broadtable with sep (UL/ul)",
			"subject": "Test:F0202/Q.4",
			"assert-output": {
				"to-contain": [
					"<table class=\"sortable wikitable smwtable broadtable\" width=\"100%\">",
					"<th>&#160;</th><th class=\"Has-page\">Has page</th>",
					"<th class=\"Has-text\">Has text</th>",
					"<tr data-row-number=\"1\" class=\"row-odd\"><td class=\"smwtype_wpg\">Test:F0202/1</td>",
					"<td class=\"Has-page smwtype_wpg\"><ul><li>Foo</li><li>42</li></ul></td>",
					"<td class=\"Has-text smwtype_txt\" data-sort-value=\"1001\"><ul><li>1001</li><li>bar</li></ul></td></tr>",
					"</table>"
				]
			}
		},
		{
			"type": "format",
			"about": "#4 broadtable with sep (OL/ol)",
			"subject": "Test:F0202/Q.5",
			"assert-output": {
				"to-contain": [
					"<table class=\"sortable wikitable smwtable broadtable\" width=\"100%\">",
					"<th>&#160;</th><th class=\"Has-page\">Has page</th>",
					"<th class=\"Has-text\">Has text</th>",
					"<tr data-row-number=\"1\" class=\"row-odd\"><td class=\"smwtype_wpg\">Test:F0202/1</td>",
					"<td class=\"Has-page smwtype_wpg\"><ol><li>Foo</li><li>42</li></ol></td>",
					"<td class=\"Has-text smwtype_txt\"><ol><li>bar</li><li>1001</li></ol></td></tr>",
					"</table>"
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLang": "en",
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true
		}
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}