1
0
Fork 0
mirror of synced 2024-10-31 15:58:57 -04:00
ultimate-vim/sources_non_forked/vim-markdown/test/folding.vader
2018-02-04 12:35:08 +01:00

53 lines
942 B
Text

Before:
source ../after/ftplugin/markdown.vim
After:
setlocal foldexpr=0
setlocal foldmethod=manual
Given markdown;
# Title
## Chapter 1
```
This is code block
# This is just a comment
```
## Capter 2
foobar
Execute (fold level # in code block):
AssertEqual foldlevel(1), 0, '# Title'
AssertEqual foldlevel(3), 1, '## Chapter 1'
AssertEqual foldlevel(7), 2, '# This is just a comment'
AssertEqual foldlevel(8), 2, '```'
AssertEqual foldlevel(10), 1, '## Chapter 2'
AssertEqual foldlevel(12), 2, 'foobar'
Given markdown;
Fold Level 1
============
Fold Level 2
------------
Execute (fold level ==, --):
AssertEqual foldlevel(2), 1, '=='
AssertEqual foldlevel(4), 2, '--'
Given markdown;
# H1
## H1.1
## H1.2
# H2
Execute (fold level # in last line):
AssertEqual foldlevel(1), 0, '# H1'
AssertEqual foldlevel(3), 1, '## H1.1'
AssertEqual foldlevel(5), 1, '## H1.2'
AssertEqual foldlevel(7), 0, '# H2'