]> git.madduck.net Git - etc/vim.git/blob - test/folding.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:

Fix test description #319
[etc/vim.git] / test / folding.vader
1 Before:
2   source ../after/ftplugin/markdown.vim
3
4 After:
5   setlocal foldexpr=0
6   setlocal foldmethod=manual
7
8 Given markdown;
9 # Title
10
11 ## Chapter 1
12
13 ```
14 This is code block
15 # This is just a comment
16 ```
17
18 ## Capter 2
19
20 foobar
21
22 Execute (fold level # in code block):
23   AssertEqual foldlevel(1), 0, '# Title'
24   AssertEqual foldlevel(3), 1, '## Chapter 1'
25   AssertEqual foldlevel(7), 2, '# This is just a comment'
26   AssertEqual foldlevel(8), 2, '```'
27   AssertEqual foldlevel(10), 1, '## Chapter 2'
28   AssertEqual foldlevel(12), 2, 'foobar'
29
30 Given markdown;
31 Fold Level 1
32 ============
33 Fold Level 2
34 ------------
35
36 Execute (fold level ==, --):
37   AssertEqual foldlevel(2), 1, '=='
38   AssertEqual foldlevel(4), 2, '--'
39
40 Given markdown;
41 # H1
42
43 ## H1.1
44
45 ## H1.2
46
47 # H2
48
49 Execute (fold level # in last line):
50   AssertEqual foldlevel(1), 0, '# H1'
51   AssertEqual foldlevel(3), 1, '## H1.1'
52   AssertEqual foldlevel(5), 1, '## H1.2'
53   AssertEqual foldlevel(7), 0, '# H2'