]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/vim-markdown/test/insert-toc.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Do not set EDITOR/VISUAL for shell
[etc/vim.git] / .vim / bundle / vim-markdown / test / insert-toc.vader
1 Given markdown;
2 # a
3
4 ## Foo Level 2
5
6 ### Foo Level 3
7
8 #### Foo Level 4
9
10 Bar Level 2
11 -----------
12
13 ### Bar Level 3
14
15 Execute (InsertToc format):
16   :2
17   :call append('.', '')
18   :InsertToc
19
20 Expect (format):
21   # a
22
23   * [Foo Level 2](#foo-level-2)
24     * [Foo Level 3](#foo-level-3)
25       * [Foo Level 4](#foo-level-4)
26   * [Bar Level 2](#bar-level-2)
27     * [Bar Level 3](#bar-level-3)
28
29   ## Foo Level 2
30
31   ### Foo Level 3
32
33   #### Foo Level 4
34
35   Bar Level 2
36   -----------
37
38   ### Bar Level 3
39
40 Given markdown;
41 # a
42
43 ## Foo Level 2
44
45 ### Foo Level 3
46
47 #### Foo Level 4
48
49 Bar Level 2
50 -----------
51
52 ### Bar Level 3
53
54 Execute (InsertToc only h2 headers):
55   :2
56   :call append('.', '')
57   :InsertToc 2
58
59 Expect (only h2 headers):
60   # a
61
62   * [Foo Level 2](#foo-level-2)
63   * [Bar Level 2](#bar-level-2)
64
65   ## Foo Level 2
66
67   ### Foo Level 3
68
69   #### Foo Level 4
70
71   Bar Level 2
72   -----------
73
74   ### Bar Level 3
75
76 Given markdown;
77 # a
78
79 ## Foo Level 2
80
81 ### Foo Level 3
82
83 #### Foo Level 4
84
85 Bar Level 2
86 -----------
87
88 ## Baz Level 2
89
90 ## Foobar Level 2
91
92 ## Foobaz Level 2
93
94 ## Barfoo Level 2
95
96 ## Barbaz Level 2
97
98 ## Bazfoo Level 2
99
100 ## Bazbar Level 2
101
102 ## Foobarbaz Level 2
103
104 Execute (InsertNToc format, and up to h3 headers):
105   :2
106   :call append('.', '')
107   :InsertNToc 3
108
109 Expect (format, and up to h3 headers):
110   # a
111
112    1. [Foo Level 2](#foo-level-2)
113       * [Foo Level 3](#foo-level-3)
114    2. [Bar Level 2](#bar-level-2)
115    3. [Baz Level 2](#baz-level-2)
116    4. [Foobar Level 2](#foobar-level-2)
117    5. [Foobaz Level 2](#foobaz-level-2)
118    6. [Barfoo Level 2](#barfoo-level-2)
119    7. [Barbaz Level 2](#barbaz-level-2)
120    8. [Bazfoo Level 2](#bazfoo-level-2)
121    9. [Bazbar Level 2](#bazbar-level-2)
122   10. [Foobarbaz Level 2](#foobarbaz-level-2)
123
124   ## Foo Level 2
125
126   ### Foo Level 3
127
128   #### Foo Level 4
129
130   Bar Level 2
131   -----------
132
133   ## Baz Level 2
134
135   ## Foobar Level 2
136
137   ## Foobaz Level 2
138
139   ## Barfoo Level 2
140
141   ## Barbaz Level 2
142
143   ## Bazfoo Level 2
144
145   ## Bazbar Level 2
146
147   ## Foobarbaz Level 2