blob: 609e16c73767514fe7e32e0b93e0b2b4a3a6d9bb [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
Bram Moolenaar70892372016-12-09 19:51:49 +010021 call assert_equal(25, winwidth(winnr()))
22 set isprint=@
Bram Moolenaar62706602016-12-09 19:28:48 +010023
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