comparison src/testdir/test_listchars.vim @ 23956:4d88e660ce32 v8.2.2520

patch 8.2.2520: missing tests for 'listchars' Commit: https://github.com/vim/vim/commit/04ea7e9049706788179945e2a91922c0b7cb9ed0 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 16 21:14:33 2021 +0100 patch 8.2.2520: missing tests for 'listchars' Problem: Missing tests for 'listchars'. Solution: Add a few more checks. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/7854)
author Bram Moolenaar <Bram@vim.org>
date Tue, 16 Feb 2021 21:15:04 +0100
parents 44be09b25619
children c784e176334c
comparison
equal deleted inserted replaced
23955:d7f49f279146 23956:4d88e660ce32
334 set listchars=tab:+-+,lead:^,space:>,trail:<,eol:% 334 set listchars=tab:+-+,lead:^,space:>,trail:<,eol:%
335 call assert_equal(['+------+^^one>>two<<%'], ScreenLines(1, virtcol('$'))) 335 call assert_equal(['+------+^^one>>two<<%'], ScreenLines(1, virtcol('$')))
336 close 336 close
337 call assert_equal(['+------+^^one>>two<<%'], ScreenLines(1, virtcol('$'))) 337 call assert_equal(['+------+^^one>>two<<%'], ScreenLines(1, virtcol('$')))
338 338
339 " Setting invalid value for a local setting should not impact the local and
340 " global settings
341 split
342 setlocal listchars=tab:<->,lead:_,space:.,trail:@,eol:#
343 let cmd = 'setlocal listchars=tab:{.},lead:-,space:=,trail:#,eol:$,x'
344 call assert_fails(cmd, 'E474:')
345 call assert_equal(['<------>__one..two@@#'], ScreenLines(1, virtcol('$')))
346 close
347 call assert_equal(['+------+^^one>>two<<%'], ScreenLines(1, virtcol('$')))
348
349 " Setting invalid value for a global setting should not impact the local and
350 " global settings
351 split
352 setlocal listchars=tab:<->,lead:_,space:.,trail:@,eol:#
353 let cmd = 'setglobal listchars=tab:{.},lead:-,space:=,trail:#,eol:$,x'
354 call assert_fails(cmd, 'E474:')
355 call assert_equal(['<------>__one..two@@#'], ScreenLines(1, virtcol('$')))
356 close
357 call assert_equal(['+------+^^one>>two<<%'], ScreenLines(1, virtcol('$')))
358
339 %bw! 359 %bw!
340 set list& listchars& 360 set list& listchars&
341 endfunc 361 endfunc
342 362
343 " vim: shiftwidth=2 sts=2 expandtab 363 " vim: shiftwidth=2 sts=2 expandtab