comparison src/testdir/test_display.vim @ 34157:e7d64a3fffe4 v9.1.0039

patch 9.1.0039: too vague errors for 'listchars'/'fillchars' Commit: https://github.com/vim/vim/commit/6a8d2e1634f8f0d7463a2786dbcbe0f38dd287a7 Author: zeertzjq <zeertzjq@outlook.com> Date: Wed Jan 17 20:54:49 2024 +0100 patch 9.1.0039: too vague errors for 'listchars'/'fillchars' Problem: too vague errors for 'listchars'/'fillchars' Solution: Include the field name in error message. (zeertzjq) related: neovim/neovim#27050 closes: #13877 Co-authored-by: Cole Frankenhoff <cole.nhf@gmail.com> Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 17 Jan 2024 21:15:03 +0100
parents 7b26c36e9b3b
children
comparison
equal deleted inserted replaced
34156:6e58c97e633a 34157:e7d64a3fffe4
250 " Test for 'eob' (EndOfBuffer) item in 'fillchars' 250 " Test for 'eob' (EndOfBuffer) item in 'fillchars'
251 func Test_eob_fillchars() 251 func Test_eob_fillchars()
252 " default value 252 " default value
253 call assert_match('eob:\~', &fillchars) 253 call assert_match('eob:\~', &fillchars)
254 " invalid values 254 " invalid values
255 call assert_fails(':set fillchars=eob:', 'E474:') 255 call assert_fails(':set fillchars=eob:', 'E1511:')
256 call assert_fails(':set fillchars=eob:xy', 'E474:') 256 call assert_fails(':set fillchars=eob:xy', 'E1511:')
257 call assert_fails(':set fillchars=eob:\255', 'E474:') 257 call assert_fails(':set fillchars=eob:\255', 'E1511:')
258 call assert_fails(':set fillchars=eob:<ff>', 'E474:') 258 call assert_fails(':set fillchars=eob:<ff>', 'E1511:')
259 call assert_fails(":set fillchars=eob:\x01", 'E474:') 259 call assert_fails(":set fillchars=eob:\x01", 'E1512:')
260 call assert_fails(':set fillchars=eob:\\x01', 'E474:') 260 call assert_fails(':set fillchars=eob:\\x01', 'E1512:')
261 " default is ~ 261 " default is ~
262 new 262 new
263 redraw 263 redraw
264 call assert_equal('~', Screenline(2)) 264 call assert_equal('~', Screenline(2))
265 set fillchars=eob:+ 265 set fillchars=eob:+
409 call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}6', {}) 409 call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}6', {})
410 410
411 call StopVimInTerminal(buf) 411 call StopVimInTerminal(buf)
412 endfunc 412 endfunc
413 413
414 func Test_display_lastline() 414 func Test_display_lastline_dump()
415 CheckScreendump 415 CheckScreendump
416 416
417 call Run_Test_display_lastline('') 417 call Run_Test_display_lastline('')
418 call Run_Test_display_lastline('euro_') 418 call Run_Test_display_lastline('euro_')
419 419 endfunc
420 call assert_fails(':set fillchars=lastline:', 'E474:') 420
421 call assert_fails(':set fillchars=lastline:〇', 'E474:') 421 func Test_display_lastline_fails()
422 call assert_fails(':set fillchars=lastline:', 'E1511:')
423 call assert_fails(':set fillchars=lastline:〇', 'E1512:')
422 endfunc 424 endfunc
423 425
424 func Test_display_long_lastline() 426 func Test_display_long_lastline()
425 CheckScreendump 427 CheckScreendump
426 428