comparison src/testdir/test_listlbr.in @ 6062:50575818a97f v7.4.370

updated for version 7.4.370 Problem: Linebreak test fails when encoding is not utf-8. (Danek Duvall) Solution: Split the test in a single byte one and a utf-8 one. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Wed, 16 Jul 2014 17:01:53 +0200
parents d42a1d3b74d4
children 69da1498ce89
comparison
equal deleted inserted replaced
6061:6d4b12eb13d4 6062:50575818a97f
1 Test for linebreak and list option 1 Test for linebreak and list option (non-utf8)
2 2
3 STARTTEST 3 STARTTEST
4 :so small.vim 4 :so small.vim
5 :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif 5 :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
6 :10new|:vsp|:vert resize 20 6 :10new|:vsp|:vert resize 20
7 :put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \" 7 :put =\"\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP \"
8 :norm! zt 8 :norm! zt
9 :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap 9 :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
10 :fu! ScreenChar(width) 10 :fu! ScreenChar(width)
11 : let c='' 11 : let c=''
12 : for j in range(1,4) 12 : for j in range(1,4)
30 :let g:test="Test 2: set linebreak + set list" 30 :let g:test="Test 2: set linebreak + set list"
31 :set linebreak list listchars= 31 :set linebreak list listchars=
32 :redraw! 32 :redraw!
33 :let line=ScreenChar(winwidth(0)) 33 :let line=ScreenChar(winwidth(0))
34 :call DoRecordScreen() 34 :call DoRecordScreen()
35 :let g:test ="Test 3: set linebreak + set list + fancy listchars" 35 :let g:test ="Test 3: set linebreak nolist"
36 :exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6"
37 :redraw!
38 :let line=ScreenChar(winwidth(0))
39 :call DoRecordScreen()
40 :let g:test ="Test 4: set linebreak nolist"
41 :set nolist linebreak 36 :set nolist linebreak
42 :redraw! 37 :redraw!
43 :let line=ScreenChar(winwidth(0)) 38 :let line=ScreenChar(winwidth(0))
44 :call DoRecordScreen() 39 :call DoRecordScreen()
45 :let g:test ="Test 5: set nolinebreak list" 40 :let g:test ="Test 4: set linebreak with tab and 1 line as long as screen: should break!"
46 :set list nolinebreak
47 :redraw!
48 :let line=ScreenChar(winwidth(0))
49 :call DoRecordScreen()
50 :let g:test ="Test 6: set linebreak with tab and 1 line as long as screen: should break!"
51 :set nolist linebreak ts=8 41 :set nolist linebreak ts=8
52 :let line="1\t".repeat('a', winwidth(0)-2) 42 :let line="1\t".repeat('a', winwidth(0)-2)
53 :$put =line 43 :$put =line
54 :$ 44 :$
55 :norm! zt 45 :norm! zt