Test: Fix vader_setup dep from 946
This commit is contained in:
		| @@ -361,6 +361,7 @@ function! s:populate_wikilocal_options() abort | ||||
|         \ 'auto_toc': {'type': type(0), 'default': 0, 'min': 0, 'max': 1}, | ||||
|         \ 'automatic_nested_syntaxes': {'type': type(0), 'default': 1, 'min': 0, 'max': 1}, | ||||
|         \ 'base_url': {'type': type(''), 'default': '', 'min_length': 1}, | ||||
|         \ 'commentstring': {'type': type(''), 'default': '%%%s'}, | ||||
|         \ 'css_name': {'type': type(''), 'default': 'style.css', 'min_length': 1}, | ||||
|         \ 'custom_wiki2html': {'type': type(''), 'default': ''}, | ||||
|         \ 'custom_wiki2html_args': {'type': type(''), 'default': ''}, | ||||
|   | ||||
| @@ -9,13 +9,6 @@ if exists('b:did_ftplugin') | ||||
| endif | ||||
| 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') | ||||
|   let &l:conceallevel = vimwiki#vars#get_global('conceallevel') | ||||
| endif | ||||
| @@ -142,6 +135,10 @@ if v:version > 703 | ||||
|   setlocal formatoptions+=j | ||||
| endif | ||||
|  | ||||
| " Set commentstring %%%s | ||||
| let &l:commentstring = vimwiki#vars#get_wikilocal('commentstring') | ||||
|  | ||||
|  | ||||
| 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): | ||||
|   if exists('g:vimwiki_commentstring') | ||||
| @@ -8,22 +17,16 @@ After (clean up): | ||||
|     unlet b:did_ftplugin | ||||
|   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): | ||||
|   call vimwiki#vars#init() | ||||
|   set ft=vimwiki | ||||
|   AssertEqual '%%%s', &commentstring | ||||
|  | ||||
| Execute (html commentstring): | ||||
|   let g:vimwiki_commentstring='<!-- %s -->' | ||||
|   call vimwiki#vars#init() | ||||
|   set ft=vimwiki | ||||
|   AssertEqual '<!-- %s -->', &commentstring | ||||
|  | ||||
| Include: vader_includes/vader_teardown.vader | ||||
|  | ||||
| Expect (void): | ||||
|   txt | ||||
|   | ||||
		Reference in New Issue
	
	Block a user