blob: ba7b7d7626a59457fdf20b339ea9bcd1c4683ddf [file] [log] [blame]
Bram Moolenaar62706602016-12-09 19:28:48 +01001" 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
22 1put='e more noise blah blah‚ more stuff here'
23
24 let expect = "e more noise blah blah<82\n> more stuff here \n"
25
26 call cursor(2, 1)
27 norm! zt
28 redraw!
29 call assert_equal(expect, s:screenline(1,2))
30 set fdc=2
31 redraw!
32 let expect = " e more noise blah blah<\n 82> more stuff here \n"
33 call assert_equal(expect, s:screenline(1,2))
34
35 quit!
36 quit!
37endfunction