Patch 8.2.2520
Problem: Missing tests for 'listchars'.
Solution: Add a few more checks. (Yegappan Lakshmanan, closes #7854)
Files: src/testdir/test_listchars.vim
*** ../vim-8.2.2519/src/testdir/test_listchars.vim 2021-02-15 20:37:58.457374538 +0100
--- src/testdir/test_listchars.vim 2021-02-16 21:13:41.209828574 +0100
***************
*** 336,341 ****
--- 336,361 ----
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
*** ../vim-8.2.2519/src/version.c 2021-02-15 21:30:26.750092486 +0100
--- src/version.c 2021-02-16 21:13:32.625843260 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2520,
/**/
--
If your life is a hard drive,
Christ can be your backup.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///