2020-07-31 00:07:50 +02:00
|
|
|
# Test comment string PR #946
|
2020-08-12 16:35:40 +02:00
|
|
|
# TODO try default
|
2020-07-31 00:07:50 +02:00
|
|
|
# TODO try editing other buffer
|
|
|
|
#Execute (default commenstring, ft vimwiki):
|
|
|
|
# AssertEqual &filetype[0], 't'
|
|
|
|
# AssertEqual '/*%s*/', &commentstring
|
|
|
|
|
|
|
|
|
|
|
|
Given txt (txt):
|
|
|
|
txt
|
2020-07-31 00:04:43 +02:00
|
|
|
|
|
|
|
After (clean up):
|
|
|
|
if exists('g:vimwiki_commentstring')
|
|
|
|
unlet g:vimwiki_commentstring
|
|
|
|
endif
|
|
|
|
if exists('b:did_ftplugin')
|
|
|
|
unlet b:did_ftplugin
|
|
|
|
endif
|
|
|
|
|
|
|
|
Execute (default vimwiki commentstring):
|
2020-07-31 00:07:50 +02:00
|
|
|
call vimwiki#vars#init()
|
2020-07-31 00:04:43 +02:00
|
|
|
set ft=vimwiki
|
|
|
|
AssertEqual '%%%s', &commentstring
|
|
|
|
|
|
|
|
Execute (html commentstring):
|
|
|
|
let g:vimwiki_commentstring='<!-- %s -->'
|
2020-07-31 00:07:50 +02:00
|
|
|
call vimwiki#vars#init()
|
2020-07-31 00:04:43 +02:00
|
|
|
set ft=vimwiki
|
|
|
|
AssertEqual '<!-- %s -->', &commentstring
|
|
|
|
|
2020-07-31 00:07:50 +02:00
|
|
|
Expect (void):
|
|
|
|
txt
|