Test: Fix vader_setup dep from 946
This commit is contained in:
parent
0a5a33af19
commit
5651e744a6
@ -361,6 +361,7 @@ function! s:populate_wikilocal_options() abort
|
|||||||
\ 'auto_toc': {'type': type(0), 'default': 0, 'min': 0, 'max': 1},
|
\ 'auto_toc': {'type': type(0), 'default': 0, 'min': 0, 'max': 1},
|
||||||
\ 'automatic_nested_syntaxes': {'type': type(0), 'default': 1, 'min': 0, 'max': 1},
|
\ 'automatic_nested_syntaxes': {'type': type(0), 'default': 1, 'min': 0, 'max': 1},
|
||||||
\ 'base_url': {'type': type(''), 'default': '', 'min_length': 1},
|
\ 'base_url': {'type': type(''), 'default': '', 'min_length': 1},
|
||||||
|
\ 'commentstring': {'type': type(''), 'default': '%%%s'},
|
||||||
\ 'css_name': {'type': type(''), 'default': 'style.css', 'min_length': 1},
|
\ 'css_name': {'type': type(''), 'default': 'style.css', 'min_length': 1},
|
||||||
\ 'custom_wiki2html': {'type': type(''), 'default': ''},
|
\ 'custom_wiki2html': {'type': type(''), 'default': ''},
|
||||||
\ 'custom_wiki2html_args': {'type': type(''), 'default': ''},
|
\ 'custom_wiki2html_args': {'type': type(''), 'default': ''},
|
||||||
|
@ -9,13 +9,6 @@ if exists('b:did_ftplugin')
|
|||||||
endif
|
endif
|
||||||
let b:did_ftplugin = 1 " Don't load another plugin for this buffer
|
let b:did_ftplugin = 1 " Don't load another plugin for this buffer
|
||||||
|
|
||||||
" Enable/disable commentstring %%%s
|
|
||||||
if !exists('g:vimwiki_commentstring')
|
|
||||||
setlocal commentstring=%%%s
|
|
||||||
elseif g:vimwiki_commentstring != ""
|
|
||||||
let &l:commentstring=g:vimwiki_commentstring
|
|
||||||
endif
|
|
||||||
|
|
||||||
if vimwiki#vars#get_global('conceallevel') && exists('+conceallevel')
|
if vimwiki#vars#get_global('conceallevel') && exists('+conceallevel')
|
||||||
let &l:conceallevel = vimwiki#vars#get_global('conceallevel')
|
let &l:conceallevel = vimwiki#vars#get_global('conceallevel')
|
||||||
endif
|
endif
|
||||||
@ -142,6 +135,10 @@ if v:version > 703
|
|||||||
setlocal formatoptions+=j
|
setlocal formatoptions+=j
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Set commentstring %%%s
|
||||||
|
let &l:commentstring = vimwiki#vars#get_wikilocal('commentstring')
|
||||||
|
|
||||||
|
|
||||||
let &formatlistpat = vimwiki#vars#get_wikilocal('rxListItem')
|
let &formatlistpat = vimwiki#vars#get_wikilocal('rxListItem')
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
Include: vader_includes/vader_setup.vader
|
# Test comment string PR #946
|
||||||
|
# TODO try default
|
||||||
|
# TODO try editing other buffer
|
||||||
|
#Execute (default commenstring, ft vimwiki):
|
||||||
|
# AssertEqual &filetype[0], 't'
|
||||||
|
# AssertEqual '/*%s*/', &commentstring
|
||||||
|
|
||||||
|
|
||||||
|
Given txt (txt):
|
||||||
|
txt
|
||||||
|
|
||||||
After (clean up):
|
After (clean up):
|
||||||
if exists('g:vimwiki_commentstring')
|
if exists('g:vimwiki_commentstring')
|
||||||
@ -8,22 +17,16 @@ After (clean up):
|
|||||||
unlet b:did_ftplugin
|
unlet b:did_ftplugin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
Execute (default commentstring):
|
|
||||||
AssertEqual '/*%s*/', &commentstring
|
|
||||||
|
|
||||||
Execute (default commenstring, ft vimwiki):
|
|
||||||
let g:vimwiki_commentstring=""
|
|
||||||
set ft=vimwiki
|
|
||||||
AssertEqual '/*%s*/', &commentstring
|
|
||||||
|
|
||||||
Execute (default vimwiki commentstring):
|
Execute (default vimwiki commentstring):
|
||||||
|
call vimwiki#vars#init()
|
||||||
set ft=vimwiki
|
set ft=vimwiki
|
||||||
AssertEqual '%%%s', &commentstring
|
AssertEqual '%%%s', &commentstring
|
||||||
|
|
||||||
Execute (html commentstring):
|
Execute (html commentstring):
|
||||||
let g:vimwiki_commentstring='<!-- %s -->'
|
let g:vimwiki_commentstring='<!-- %s -->'
|
||||||
|
call vimwiki#vars#init()
|
||||||
set ft=vimwiki
|
set ft=vimwiki
|
||||||
AssertEqual '<!-- %s -->', &commentstring
|
AssertEqual '<!-- %s -->', &commentstring
|
||||||
|
|
||||||
Include: vader_includes/vader_teardown.vader
|
Expect (void):
|
||||||
|
txt
|
||||||
|
Loading…
Reference in New Issue
Block a user