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 -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202102162015.11GKF9Sp2002583%40masaka.moolenaar.net.

Raspunde prin e-mail lui