1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
|
# Non regression tests for issues, see changelog
# In reverse chronological order
#
# Thanks to all contributors with issues and pull request on github
#
Given vimwiki (a):
a
Execute (Set filename wiki_test.md):
file wiki_test.md
Expect (a):
a
################################################################################
Execute (Log):
Log '#915 Vimwiki Markdown Blockquote Syntax issue'
call SetSyntax('markdown')
Given vimwiki (One blockquote):
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam faucibus rhoncus est sed facilisis. Sed imperdiet massa tellus, eu fermentum felis fringilla vel.
Do (gqq):
gqq
Expect (Well formated and cursor on Sed):
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam faucibus rhoncus
> est sed facilisis. Sed imperdiet massa tellus, eu fermentum felis fringilla
> vel.
Do (move cursor and gww):
fS
gww
i__HERE__
Expect (Well formated and cursor on Sed):
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam faucibus rhoncus
> est sed facilisis. __HERE__Sed imperdiet massa tellus, eu fermentum felis fringilla
> vel.
Given vimwiki (Multiple line blockquote):
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam faucibus rhoncus
> est sed facilisis. Sed imperdiet massa tellus, eu fermentum felis fringilla
> vel.
Execute (no JJ && Assert for Version > 7.3):
normal JJ
if v:version > 703
AssertEqual getline(1), '> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam faucibus rhoncus est sed facilisis. Sed imperdiet massa tellus, eu fermentum felis fringilla vel.'
endif
################################################################################
Execute (Log):
Log '#949 <Enter> create link bug with Chinese characters'
call SetSyntax('markdown')
Given vimwiki (Madarin with vimwiki Yeeepy):
你
你好
你们好
你们好啊
你们好啊啊
你们好啊aaaaa
aaaaa你们好啊
Do (Enter in all):
\<Cr>j \<Cr>j \<Cr>j \<Cr>j \<Cr>j \<Cr>j \<Cr>j
Expect (all WORDS are links):
[你](你)
[你好](你好)
[你们好](你们好)
[你们好啊](你们好啊)
[你们好啊啊](你们好啊啊)
[你们好啊aaaaa](你们好啊aaaaa)
[aaaaa你们好啊](aaaaa你们好啊)
################################################################################
Execute (Log):
Log '#735 Fix off-by-one error in get_next_line and get_prev_line'
file wiki_test.md
call SetSyntax('markdown')
Given vimwiki (P#735 -> I#407):
1. item1
2. item2
```
echo "hello world"
```
3. item3
Do (o):
o
Expect (Renumber all):
1. item1
2.
3. item2
```
echo "hello world"
```
4. item3
################################################################################
Execute (Log):
Log '#899 conceallevel is setted globally when editing a wiki file (PR #900)'
call SetSyntax('markdown')
Given vimwiki (Void):
Execute (conceal):
set conceallevel=1
let g:vimwiki_global_vars['conceallevel']=2
Log ' ConcealLevel is set to vimwiki for a .md'
call SetSyntax('markdown')
file main.md
edit
AssertEqual &ft, 'vimwiki'
AssertEqual @%, 'main.md'
if exists('+conceallevel')
AssertEqual &conceallevel, 2
endif
Log ' ConcealLevel is set to vim for a no_ext'
edit no_ext
AssertEqual &ft, ''
if exists('+conceallevel')
AssertEqual &conceallevel, 1
endif
Log ' Again ConcealLevel is set to vimwiki for a .md (just for fun)'
let g:vimwiki_global_vars['conceallevel']=0
edit new.md
AssertEqual &ft, 'vimwiki'
AssertEqual @%, 'new.md'
if exists('+conceallevel')
AssertEqual &conceallevel, 0
endif
################################################################################
Execute (Log):
Log 'PR #528: Add option |g:vimwiki_create_link| to prevent link creation'
call SetSyntax('markdown')
Given vimwiki (Link):
Link
Do (Enter):
\<CR>
# TODO should be Link.md, revise the test
Expect (Link):
[Link](Link)
Do (<CR><CR>):
\<CR>\<CR>
:AssertEqual expand('%:t'), 'Link.md'\<CR>
Given vimwiki (Link):
Link
Do (No link: <CR><CR>):
:call vimwiki#vars#set_global('markdown_create_link', 0)
\<CR>\<CR>
:AssertEqual expand('%:t'), 'main.md'\<CR>
Expect (Link):
[Link](Link)
Execute (wipeout):
" This solves many things
file /testplugin/[Vader-workbench]
|