test(config): cover link_severity in parity harnesses and docs
Both editor harnesses now emit diagnostic.link_severity and exercise a
non-default override ('error') in the sample scenario, diffed against the
shared golden. Drop the README "not wired" caveat now that the value flows
through, and document the g:nuwiki_link_severity global.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,9 @@ function! s:dump(payload) abort
|
||||
call add(s:lines, 'file_extension=' . a:payload.file_extension)
|
||||
call add(s:lines, 'syntax=' . a:payload.syntax)
|
||||
call add(s:lines, 'log_level=' . a:payload.log_level)
|
||||
if has_key(a:payload, 'diagnostic')
|
||||
call add(s:lines, 'diagnostic.link_severity=' . a:payload.diagnostic.link_severity)
|
||||
endif
|
||||
if has_key(a:payload, 'wikis')
|
||||
let l:i = 0
|
||||
for l:w in a:payload.wikis
|
||||
@@ -28,7 +31,7 @@ endfunction
|
||||
|
||||
" Scenario 1: defaults (no globals set).
|
||||
unlet! g:nuwiki_wiki_root g:nuwiki_file_extension g:nuwiki_syntax
|
||||
unlet! g:nuwiki_log_level g:nuwiki_wikis
|
||||
unlet! g:nuwiki_log_level g:nuwiki_wikis g:nuwiki_link_severity
|
||||
call add(s:lines, '[default]')
|
||||
call s:dump(nuwiki#lsp#settings())
|
||||
|
||||
@@ -37,6 +40,7 @@ let g:nuwiki_wiki_root = '/tmp/base'
|
||||
let g:nuwiki_file_extension = '.md'
|
||||
let g:nuwiki_syntax = 'vimwiki'
|
||||
let g:nuwiki_log_level = 'debug'
|
||||
let g:nuwiki_link_severity = 'error'
|
||||
let g:nuwiki_wikis = [
|
||||
\ { 'name': 'personal', 'root': '/tmp/personal',
|
||||
\ 'file_extension': '.wiki', 'index': 'home',
|
||||
|
||||
Reference in New Issue
Block a user