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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
{
"description": "Test `format=template` output using unnamed arguments (#885)",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has page property",
"contents": "[[Has type::Page]]"
},
{
"namespace": "NS_TEMPLATE",
"page": "TemplateOutputUsingUnnamedArgumentsForNonUnicode",
"contents": "<includeonly>[{{{#}}}]:{{{1}}}:{{{2}}}:{{{#userparam}}}:</includeonly>"
},
{
"namespace": "NS_TEMPLATE",
"page": "TemplateOutputUsingUnnamedArgumentsForNonUnicodeExtra",
"contents": "<includeonly><div>{{{#userparam}}}</div></includeonly>"
},
{
"page": "Foo",
"contents": "[[Has page property::ABC]] [[Has page property::DEF]] [[Category:template-001]]"
},
{
"page": "Bar",
"contents": "[[Has page property::ABC]] [[Has page property::DEF]] [[Category:template-001]]"
},
{
"page": "123",
"contents": "[[Has page property::ABC]] [[Has page property::DEF]] [[Category:template-001]]"
},
{
"page": "yxz",
"contents": "[[Has page property::ABC]] [[Has page property::DEF]] [[Category:template-001]]"
},
{
"page": "template-001-asc-order-unnamed-args",
"contents": "{{#ask:[[Category:template-001]][[Has page property::ABC]] |?Has page property |sep=, |format=template |order=asc |link=none |limit=3 |searchlabel=furtherresults |userparam=[$%&*==42] |template=TemplateOutputUsingUnnamedArgumentsForNonUnicode |introtemplate=TemplateOutputUsingUnnamedArgumentsForNonUnicodeExtra |outrotemplate=TemplateOutputUsingUnnamedArgumentsForNonUnicodeExtra}}"
},
{
"page": "template-001-desc-order-unnamed-args",
"contents": "{{#ask:[[Category:template-001]][[Has page property::ABC]] |?Has page property |sep=, |format=template |order=desc |link=none |limit=3 |searchlabel=furtherresults |userparam=[$%&*==42] |template=TemplateOutputUsingUnnamedArgumentsForNonUnicode |introtemplate=TemplateOutputUsingUnnamedArgumentsForNonUnicodeExtra |outrotemplate=TemplateOutputUsingUnnamedArgumentsForNonUnicodeExtra}}"
}
],
"tests": [
{
"type": "format",
"about": "#0 (1.31-) asc template output using unnamed arguments, #885 further results link",
"skip-on": {
"mediawiki": [ ">1.30.x", "MediaWiki changed the HTML Tidy" ]
},
"subject": "template-001-asc-order-unnamed-args",
"assert-output": {
"to-contain": [
"<div>[$%&*==42]</div>",
"[0]:123:ABC, DEF:[$%&*==42]:",
"[1]:Bar:ABC, DEF:[$%&*==42]:",
"[2]:Foo:ABC, DEF:[$%&*==42]:",
"<div>[$%&*==42]</div><span class=\"smw-template-furtherresults\">"
]
}
},
{
"type": "format",
"about": "#0 (1.31+) asc template output using unnamed arguments, #885 further results link",
"skip-on": {
"mediawiki": [ "<1.30.x", "MediaWiki changed the HTML Tidy" ]
},
"subject": "template-001-asc-order-unnamed-args",
"assert-output": {
"to-contain": [
"<div>[$%&*==42]</div>",
"[0]:123:ABC, DEF:[$%&*==42]:",
"[1]:Bar:ABC, DEF:[$%&*==42]:",
"[2]:Foo:ABC, DEF:[$%&*==42]:",
"<div>[$%&*==42]</div><p><span class=\"smw-template-furtherresults\">"
]
}
},
{
"type": "format",
"about": "#1 (1.31-) desc template output using unnamed arguments",
"skip-on": {
"mediawiki": [ ">1.30.x", "MediaWiki changed the HTML Tidy" ]
},
"subject": "template-001-desc-order-unnamed-args",
"assert-output": {
"to-contain": [
"<div>[$%&*==42]</div>",
"[0]:Yxz:ABC, DEF:[$%&*==42]:",
"[1]:Foo:ABC, DEF:[$%&*==42]:",
"[2]:Bar:ABC, DEF:[$%&*==42]:",
"<div>[$%&*==42]</div><span class=\"smw-template-furtherresults\">"
]
}
},
{
"type": "format",
"about": "#1 (1.31+) desc template output using unnamed arguments",
"skip-on": {
"mediawiki": [ "<1.30.x", "MediaWiki changed the HTML Tidy" ]
},
"subject": "template-001-desc-order-unnamed-args",
"assert-output": {
"to-contain": [
"<div>[$%&*==42]</div>",
"[0]:Yxz:ABC, DEF:[$%&*==42]:",
"[1]:Foo:ABC, DEF:[$%&*==42]:",
"[2]:Bar:ABC, DEF:[$%&*==42]:",
"<div>[$%&*==42]</div><p><span class=\"smw-template-furtherresults\">"
]
}
}
],
"settings": {
"smwgNamespacesWithSemanticLinks": {
"NS_MAIN": true,
"SMW_NS_PROPERTY": true
}
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}
|