diff --git a/test/toc.vader b/test/toc.vader index 51269526..98cc1038 100644 --- a/test/toc.vader +++ b/test/toc.vader @@ -28,11 +28,14 @@ test Execute (Toc setex headers): :Toc + :setl modifiable + :%s/\m^\([^|]*|\) // + :setl nomodifiable nomodified Expect (setex headers): header 1 - header 2 - header 3 + header 2 + ### header 3 Given markdown; # header 1 @@ -49,11 +52,14 @@ test Execute (Toc atx headers): :Toc + :setl ma + :%s/\m^\([^|]*|\) // + :setl noma nomod Expect (atx headers): - header 1 - header 2 - header 3 + # header 1 + ## header 2 + ### header 3 Given markdown; ATX tests. @@ -135,34 +141,37 @@ setex h2 Execute (Toc multiple headers): :Toc + :setl ma + :%s/\m^\([^|]*|\) // + :setl noma nomod Expect (multiple headers): - h1 space - h1 nospace - h1 2 spaces - h1 trailing hash - h2 space - h2 nospace - h2 trailing hash - h3 space - h3 nospace - h3 trailing hash - h4 - h5 - h6 - h1 before h2 - h2 between h1s - h1 after h2 + # h1 space + #h1 nospace + # h1 2 spaces + # h1 trailing hash # + ## h2 space + ##h2 nospace + ## h2 trailing hash ## + ### h3 space + ###h3 nospace + ### h3 trailing hash ### + #### h4 + ##### h5 + ###### h6 + # h1 before h2 + ## h2 between h1s + # h1 after h2 setex h1 - setex h2 + setex h2 setex h1 single punctuation setex h1 punctuation longer than header setex h1 before atx - atx h2 - atx h3 - atx h1 - setex h2 - atx h3 2 + ## atx h2 + ### atx h3 + # atx h1 + setex h2 + ### atx h3 2 Execute: :lclose