vimwiki/test/list_update.vader
Lionel Flandrin dcd68a6781 Fix off-by-one error in get_next_line and get_prev_line
The functions stopped at the end/start block marker (respectively)
instead of returning the following line. This caused issues when the
function was subsequently called in markdown mode since the start and
end block markers are the same.

This fixes #407
2019-07-31 17:56:08 +01:00

192 lines
2.7 KiB
Plaintext

Include: vader_includes/vader_setup.vader
Given vimwiki (Sample nested list, vimwiki syntax):
* [ ] Top Level
* [ ] Child 1
* [ ] Child 2
* [ ] Post space
{{{code
* [ ] print "hello, world"
}}}
{{{morecode
print "hello again"
}}}
* [ ] Post code
* [ ] Sub-child
* [ ] Sub-sub-child
Execute (Set syntax to default):
call SetSyntax('default')
Do (Toggle top-level):
\<C-Space>
Expect (All tree toggled):
* [X] Top Level
* [X] Child 1
* [X] Child 2
* [X] Post space
{{{code
* [ ] print "hello, world"
}}}
{{{morecode
print "hello again"
}}}
* [X] Post code
* [X] Sub-child
* [X] Sub-sub-child
Do (Toggle child):
j
\<C-Space>
Expect (Child toggled, top updated):
* [.] Top Level
* [X] Child 1
* [ ] Child 2
* [ ] Post space
{{{code
* [ ] print "hello, world"
}}}
{{{morecode
print "hello again"
}}}
* [ ] Post code
* [ ] Sub-child
* [ ] Sub-sub-child
Do (Toggle sub-child):
G
\<C-Space>
Expect (Sub-child toggled, parents updated):
* [.] Top Level
* [ ] Child 1
* [ ] Child 2
* [ ] Post space
{{{code
* [ ] print "hello, world"
}}}
{{{morecode
print "hello again"
}}}
* [o] Post code
* [ ] Sub-child
* [X] Sub-sub-child
Given markdown (Sample nested list, markdown syntax):
* [ ] Top Level
* [ ] Child 1
* [ ] Child 2
* [ ] Post space
```code
* [ ] print "hello, world"
```
```morecode
print "hello again"
```
* [ ] Post code
* [ ] Sub-child
* [ ] Sub-sub-child
Execute (Set syntax to markdown):
call SetSyntax('markdown')
Do (Toggle top-level):
\<C-Space>
Expect (All tree toggled):
* [X] Top Level
* [X] Child 1
* [X] Child 2
* [X] Post space
```code
* [ ] print "hello, world"
```
```morecode
print "hello again"
```
* [X] Post code
* [X] Sub-child
* [X] Sub-sub-child
Do (Toggle child):
j
\<C-Space>
Expect (Child toggled, top updated):
* [.] Top Level
* [X] Child 1
* [ ] Child 2
* [ ] Post space
```code
* [ ] print "hello, world"
```
```morecode
print "hello again"
```
* [ ] Post code
* [ ] Sub-child
* [ ] Sub-sub-child
Do (Toggle sub-child):
G
\<C-Space>
Expect (Sub-child toggled, parents updated):
* [.] Top Level
* [ ] Child 1
* [ ] Child 2
* [ ] Post space
```code
* [ ] print "hello, world"
```
```morecode
print "hello again"
```
* [o] Post code
* [ ] Sub-child
* [X] Sub-sub-child
Include: vader_includes/vader_teardown.vader