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
|
{
"description": "Test `#ask` NS_FILE and DISPLAYTITLE (`wgContLang=en`, `wgLang=en`, `wgEnableUploads`, `wgFileExtensions`, 'wgDefaultUserOptions', `wgRestrictDisplayTitle`)",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has text",
"contents": "[[Has type::Text]]"
},
{
"namespace": "NS_FILE",
"page": "P0708-text-file.txt",
"contents": {
"upload": {
"file" : "/../Fixtures/file-upload.txt",
"text" : "[[File type::txt]] {{DISPLAYTITLE:DIFFERENT TITLE}}"
}
}
},
{
"page": "Example/P0708/Q.1",
"contents": "{{#ask: [[File type::txt]] |format=table |limit=1 }}"
}
],
"tests": [
{
"type": "parser",
"about": "#0 (using DISPLAYTITLE)",
"subject": "Example/P0708/Q.1",
"assert-output": {
"to-contain": [
"<a href=\".*:P0708-text-file.txt\" title=\"File:P0708-text-file.txt\">DIFFERENT TITLE</a>"
]
}
}
],
"settings": {
"wgContLang": "en",
"wgLang": "en",
"wgRestrictDisplayTitle": false,
"wgEnableUploads": true,
"wgFileExtensions": [
"png",
"txt"
],
"wgDefaultUserOptions": {
"thumbsize": 5
},
"smwgPageSpecialProperties": [
"_MDAT"
],
"smwgNamespacesWithSemanticLinks": {
"NS_MAIN": true,
"NS_FILE": true
}
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}
|