diff options
author | zeertzjq <zeertzjq@outlook.com> | 2021-11-17 07:07:15 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2021-11-17 07:11:46 +0800 |
commit | 5ed2a5cf9cf6a5f90e2b5bf3ef26ffea02f923f1 (patch) | |
tree | 00760e66d368a122f51e25ab8865ceb633bde31e /src | |
parent | 7528bcec42bddfb644561adde42b9ea764faffda (diff) | |
download | rneovim-5ed2a5cf9cf6a5f90e2b5bf3ef26ffea02f923f1.tar.gz rneovim-5ed2a5cf9cf6a5f90e2b5bf3ef26ffea02f923f1.tar.bz2 rneovim-5ed2a5cf9cf6a5f90e2b5bf3ef26ffea02f923f1.zip |
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)
https://github.com/vim/vim/commit/04ea7e9049706788179945e2a91922c0b7cb9ed0
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_listchars.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_listchars.vim b/src/nvim/testdir/test_listchars.vim index f57d4f9ab9..d55237c202 100644 --- a/src/nvim/testdir/test_listchars.vim +++ b/src/nvim/testdir/test_listchars.vim @@ -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 |