-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlsthParserTests.txt
93 lines (74 loc) · 1.2 KB
/
lsthParserTests.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
!! functionhooks
lsth
!!endfunctionhooks
# This is the standard article assumed to exist.
!! article
LsthSections
!! text
this is the intro
==1==
sec 1
==2==
sec 2
===3===
sec 3
==a==
sec a
==b==
this is ==not== a section
!! endarticle
!!test
transclude a heading
!!input
{{#lsth:LsthSections|1}}
!!result
<p>sec 1
</p>
!!end
!!test
transclude a heading (case insensitive)
!!input
{{#lsth:LsthSections|A}}
!!result
<p>sec a
</p>
!!end
!!test
transclude the intro
!!input
{{#lsth:LsthSections}}
!!result
<p>this is the intro
</p>
!!end
!!test
transclude a heading
!!input
{{#lsth:LsthSections|b}}
!!result
<p>this is ==not== a section
</p>
!!end
!!test
transclude a heading
!!input
{{#lsth:LsthSections|not}}
!!result
!!end
!!test
transclude offset section -w- subs.
!!input
{{#lsth:LsthSections|2}}
!!result
<p>sec 2
</p>
<h3><span class="mw-headline" id="3">3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=LsthSections&action=edit&section=T-1" title="LsthSections">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
<p>sec 3
</p>
!!end
!!test
transclude nonesistent section
!!input
{{#lsth:LsthSections|9999}}
!!result
!!end