diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-02-16 21:14:33 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-02-16 21:14:33 +0100 |
commit | 04ea7e9049706788179945e2a91922c0b7cb9ed0 (patch) | |
tree | 7a012f5a793a39aba52d6cb997e623889a966cb8 /src/testdir/test_listchars.vim | |
parent | b8554304c3673b081e9b5996f009fd0e4307e482 (diff) | |
download | vim-git-04ea7e9049706788179945e2a91922c0b7cb9ed0.tar.gz |
patch 8.2.2520: missing tests for 'listchars'v8.2.2520
Problem: Missing tests for 'listchars'.
Solution: Add a few more checks. (Yegappan Lakshmanan, closes #7854)
Diffstat (limited to 'src/testdir/test_listchars.vim')
-rw-r--r-- | src/testdir/test_listchars.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/testdir/test_listchars.vim b/src/testdir/test_listchars.vim index ca47d5283..172407a8d 100644 --- a/src/testdir/test_listchars.vim +++ b/src/testdir/test_listchars.vim @@ -336,6 +336,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 |