Skip to content

Commit 41c10cb

Browse files
committed
Fix TOC test
1 parent dcaddcc commit 41c10cb

File tree

1 file changed

+36
-27
lines changed

1 file changed

+36
-27
lines changed

test/toc.vader

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ test
2828

2929
Execute (Toc setex headers):
3030
:Toc
31+
:setl modifiable
32+
:%s/\m^\([^|]*|\)\{2} //
33+
:setl nomodifiable nomodified
3134

3235
Expect (setex headers):
3336
header 1
34-
header 2
35-
header 3
37+
header 2
38+
### header 3
3639

3740
Given markdown;
3841
# header 1
@@ -49,11 +52,14 @@ test
4952

5053
Execute (Toc atx headers):
5154
:Toc
55+
:setl modifiable
56+
:%s/\m^\([^|]*|\)\{2} //
57+
:setl nomodifiable nomodified
5258

5359
Expect (atx headers):
54-
header 1
55-
header 2
56-
header 3
60+
# header 1
61+
## header 2
62+
### header 3
5763

5864
Given markdown;
5965
ATX tests.
@@ -135,34 +141,37 @@ setex h2
135141

136142
Execute (Toc multiple headers):
137143
:Toc
144+
:setl modifiable
145+
:%s/\m^\([^|]*|\)\{2} //
146+
:setl nomodifiable nomodified
138147

139148
Expect (multiple headers):
140-
h1 space
141-
h1 nospace
142-
h1 2 spaces
143-
h1 trailing hash
144-
h2 space
145-
h2 nospace
146-
h2 trailing hash
147-
h3 space
148-
h3 nospace
149-
h3 trailing hash
150-
h4
151-
h5
152-
h6
153-
h1 before h2
154-
h2 between h1s
155-
h1 after h2
149+
# h1 space
150+
#h1 nospace
151+
# h1 2 spaces
152+
# h1 trailing hash #
153+
## h2 space
154+
##h2 nospace
155+
## h2 trailing hash ##
156+
### h3 space
157+
###h3 nospace
158+
### h3 trailing hash ###
159+
#### h4
160+
##### h5
161+
###### h6
162+
# h1 before h2
163+
## h2 between h1s
164+
# h1 after h2
156165
setex h1
157-
setex h2
166+
setex h2
158167
setex h1 single punctuation
159168
setex h1 punctuation longer than header
160169
setex h1 before atx
161-
atx h2
162-
atx h3
163-
atx h1
164-
setex h2
165-
atx h3 2
170+
## atx h2
171+
### atx h3
172+
# atx h1
173+
setex h2
174+
### atx h3 2
166175

167176
Execute:
168177
:lclose

0 commit comments

Comments
 (0)