summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0712.json
blob: 0a9c28112ffc7b5fa352ba09d46c2f18bb9b4864 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
	"description": "Test `#ask` on `format=template`/`link=none`/DISPLAYTITLE with nested template",
	"setup": [
		{
			"namespace": "NS_TEMPLATE",
			"page": "Example/P0712/Parse 1",
			"contents": "<includeonly>'''Parse 1 result:'''<br>Modify to link: [[{{{1|}}}]]<br>As-is output: {{{1|}}} '''Parse 2 result:'''<br>{{Example/P0712/Parse 2|{{{1|}}} }}</includeonly>"
		},
		{
			"namespace": "NS_TEMPLATE",
			"page": "Example/P0712/Parse 2",
			"contents": "<includeonly>Modify to link: [[{{{1|}}}]]<br>As-is output: {{{1|}}}</includeonly>"
		},
		{
			"page": "Test:P0712/1",
			"contents": "[[Issue::3853]] {{DISPLAYTITLE:Displaytitle P0712}}"
		},
		{
			"page": "Test:P0712/Q.1",
			"contents": "{{#ask: [[Issue::3853]] |link=none |template=Example/P0712/Parse 1 |format=template }}"
		},
		{
			"page": "Test:P0712/Q.2",
			"contents": "{{#ask: [[Issue::3853]] |template=Example/P0712/Parse 1 |format=template }}"
		}
	],
	"tests": [
		{
			"type": "parser",
			"about": "#0 `link=none`",
			"subject": "Test:P0712/Q.1",
			"assert-output": {
				"to-contain": [
					"<b>Parse 1 result:</b><br />Modify to link: <a href=\".*Test:P0712/1\" title=\"Test:P0712/1\">Test:P0712/1</a>",
					"<b>Parse 2 result:</b><br />Modify to link: <a href=\".*Test:P0712/1\" title=\"Test:P0712/1\">Test:P0712/1 </a><br />As-is output: Test:P0712/1"
				]
			}
		},
		{
			"type": "parser",
			"about": "#1 ",
			"subject": "Test:P0712/Q.2",
			"assert-output": {
				"to-contain": [
					"<b>Parse 1 result:</b><br />Modify to link: [[<a href=\".*Test:P0712/1\" title=\"Test:P0712/1\">Displaytitle P0712</a>]]<br />",
					"<b>Parse 2 result:</b><br />Modify to link: [[<a href=\".*/Test:P0712/1\" title=\"Test:P0712/1\">Displaytitle P0712</a> ]]"
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLang": "en",
		"wgRestrictDisplayTitle": false,
		"smwgPageSpecialProperties": [
			"_MDAT"
		]
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}