1" Test for displaying stuff 2if !has('gui_running') && has('unix') 3 set term=ansi 4endif 5 6function! s:screenline(lnum, nr) abort 7 let line = [] 8 for j in range(a:nr) 9 for c in range(1, winwidth(0)) 10 call add(line, nr2char(screenchar(a:lnum+j, c))) 11 endfor 12 call add(line, "\n") 13 endfor 14 return join(line, '') 15endfunction 16 17function! Test_display_foldcolumn() 18 new 19 vnew 20 vert resize 25 21 call assert_equal(25, winwidth(winnr())) 22 set isprint=@ 23 24 1put='e more noise blah blah more stuff here' 25 26 let expect = "e more noise blah blah<82\n> more stuff here \n" 27 28 call cursor(2, 1) 29 norm! zt 30 redraw! 31 call assert_equal(expect, s:screenline(1,2)) 32 set fdc=2 33 redraw! 34 let expect = " e more noise blah blah<\n 82> more stuff here \n" 35 call assert_equal(expect, s:screenline(1,2)) 36 37 quit! 38 quit! 39endfunction 40