mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.2520: missing tests for 'listchars'
Problem: Missing tests for 'listchars'.
Solution: Add a few more checks. (Yegappan Lakshmanan, closes vim/vim#7854)
04ea7e9049
This commit is contained in:
parent
7528bcec42
commit
5ed2a5cf9c
@ -469,6 +469,26 @@ func Test_listchars_window_local()
|
||||
close
|
||||
call assert_equal(['+------+^^one>>two<<%'], ScreenLines(1, virtcol('$')))
|
||||
|
||||
" Setting invalid value for a local setting should not impact the local and
|
||||
" global settings
|
||||
split
|
||||
setlocal listchars=tab:<->,lead:_,space:.,trail:@,eol:#
|
||||
let cmd = 'setlocal listchars=tab:{.},lead:-,space:=,trail:#,eol:$,x'
|
||||
call assert_fails(cmd, 'E474:')
|
||||
call assert_equal(['<------>__one..two@@#'], ScreenLines(1, virtcol('$')))
|
||||
close
|
||||
call assert_equal(['+------+^^one>>two<<%'], ScreenLines(1, virtcol('$')))
|
||||
|
||||
" Setting invalid value for a global setting should not impact the local and
|
||||
" global settings
|
||||
split
|
||||
setlocal listchars=tab:<->,lead:_,space:.,trail:@,eol:#
|
||||
let cmd = 'setglobal listchars=tab:{.},lead:-,space:=,trail:#,eol:$,x'
|
||||
call assert_fails(cmd, 'E474:')
|
||||
call assert_equal(['<------>__one..two@@#'], ScreenLines(1, virtcol('$')))
|
||||
close
|
||||
call assert_equal(['+------+^^one>>two<<%'], ScreenLines(1, virtcol('$')))
|
||||
|
||||
%bw!
|
||||
set list& listchars&
|
||||
endfunc
|
||||
|
Loading…
Reference in New Issue
Block a user