-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlstIncorrectParserTest.txt
114 lines (87 loc) · 1.94 KB
/
lstIncorrectParserTest.txt
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
#
# This parser test file documents known *incorrect* behavior, for which
# a bug has been opened on bugzilla. The goal of these tests is to prevent
# any additional regressions.
#
# Each test should have a bug id # in the title and a link to bugzilla
# in a comment. When the bug is resolved, the test in this file should
# be removed, and a new (correct) parser test should be added to
# lstParserTest.txt or lsthParserTest.txt.
# Force the test runner to ensure the extension is loaded
!! hooks
section
!! endhooks
!! functionhooks
lst
lstx
lsth
!!endfunctionhooks
# Standard articles
!! article
SectionsDuplicates
!! text
1 <section begin=1/>sec 1<section end=1/>
2 <section begin="2"/>sec 2<section end='2'/>
3 <section begin="3" />sec 3<section end="3" />
a <section begin=a/>sec a<section end=a/>
<section begin=a/>...<section end=a/>
!! endarticle
!! article
LsthSectionsNotASection
!! text
this is the intro
==1==
sec 1
==2==
sec 2
===3===
sec 3
==a==
sec a
==b==
this is ==not== a section
!! endarticle
#####################################################################
# Parser tests related to bug 42477
#
# "lst: transcluding a broken redirect does not show a clear error message"
# https://bugzilla.wikimedia.org/show_bug.cgi?id=42477
####################################################################
!!article
redirected-does-not-exist
!!text
#REDIRECT[[no such article]]
!!endarticle
!!test
LST: Transclude redirect to nonexistent article (bug 42477)
!!input
{{#lst:redirected-does-not-exist|anything}}
!!result
!!end
!!article
double-redirect-1
!!text
#REDIRECT[[Sections]]
!!endarticle
!!article
double-redirect-2
!!text
#REDIRECT[[double-redirect-1]]
!!endarticle
!!test
LST: Transclude double redirect (bug 42477)
!!input
{{#lst:double-redirect-2|1}}
!!result
!!end
!!article
redirect-loop
!!text
#REDIRECT[[redirect-loop]]
!!endarticle
!!test
LST: Transclude redirect loop (bug 42477)
!!input
{{#lst:redirect-loop|1}}
!!result
!!end