annotate src/testdir/test_listlbr.in @ 6462:86aacd619ac0 v7.4.560

updated for version 7.4.560 Problem: Memory leak using :wviminfo. Issue 296. Solution: Free memory when needed. (idea by Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Wed, 17 Dec 2014 21:00:49 +0100
parents 0a4efa3d2019
children 8ebcd7f1ff5b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6062
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents: 6026
diff changeset
1 Test for linebreak and list option (non-utf8)
6026
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 STARTTEST
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 :so small.vim
6266
0a4efa3d2019 updated for version 7.4.467
Bram Moolenaar <bram@vim.org>
parents: 6189
diff changeset
5 :if !exists("+linebreak") || !has("conceal") | e! test.ok | w! test.out | qa! | endif
6026
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 :10new|:vsp|:vert resize 20
6062
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents: 6026
diff changeset
7 :put =\"\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP \"
6026
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 :norm! zt
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 :fu! ScreenChar(width)
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 : let c=''
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 : for j in range(1,4)
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 : for i in range(1,a:width)
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 : let c.=nr2char(screenchar(j, i))
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 : endfor
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 : let c.="\n"
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 : endfor
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 : return c
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 :endfu
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 :fu! DoRecordScreen()
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 : wincmd l
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 : $put =printf(\"\n%s\", g:test)
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 : $put =g:line
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 : wincmd p
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 :endfu
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 :let g:test="Test 1: set linebreak"
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 :redraw!
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 :let line=ScreenChar(winwidth(0))
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 :call DoRecordScreen()
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 :let g:test="Test 2: set linebreak + set list"
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 :set linebreak list listchars=
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 :redraw!
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 :let line=ScreenChar(winwidth(0))
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 :call DoRecordScreen()
6062
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents: 6026
diff changeset
35 :let g:test ="Test 3: set linebreak nolist"
6026
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 :set nolist linebreak
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 :redraw!
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 :let line=ScreenChar(winwidth(0))
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 :call DoRecordScreen()
6062
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents: 6026
diff changeset
40 :let g:test ="Test 4: set linebreak with tab and 1 line as long as screen: should break!"
6026
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 :set nolist linebreak ts=8
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 :let line="1\t".repeat('a', winwidth(0)-2)
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 :$put =line
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 :$
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 :norm! zt
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 :redraw!
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 :let line=ScreenChar(winwidth(0))
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 :call DoRecordScreen()
6172
69da1498ce89 updated for version 7.4.422
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
49 :let line="_S_\t bla"
69da1498ce89 updated for version 7.4.422
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
50 :$put =line
69da1498ce89 updated for version 7.4.422
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
51 :$
69da1498ce89 updated for version 7.4.422
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
52 :norm! zt
69da1498ce89 updated for version 7.4.422
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
53 :let g:test ="Test 5: set linebreak with conceal and set list and tab displayed by different char (line may not be truncated)"
69da1498ce89 updated for version 7.4.422
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
54 :set cpo&vim list linebreak conceallevel=2 concealcursor=nv listchars=tab:ab
69da1498ce89 updated for version 7.4.422
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
55 :syn match ConcealVar contained /_/ conceal
69da1498ce89 updated for version 7.4.422
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
56 :syn match All /.*/ contains=ConcealVar
69da1498ce89 updated for version 7.4.422
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
57 :let line=ScreenChar(winwidth(0))
69da1498ce89 updated for version 7.4.422
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
58 :call DoRecordScreen()
6266
0a4efa3d2019 updated for version 7.4.467
Bram Moolenaar <bram@vim.org>
parents: 6189
diff changeset
59 :set cpo&vim linebreak
0a4efa3d2019 updated for version 7.4.467
Bram Moolenaar <bram@vim.org>
parents: 6189
diff changeset
60 :let g:test ="Test 6: set linebreak with visual block mode"
0a4efa3d2019 updated for version 7.4.467
Bram Moolenaar <bram@vim.org>
parents: 6189
diff changeset
61 :let line="REMOVE: this not"
0a4efa3d2019 updated for version 7.4.467
Bram Moolenaar <bram@vim.org>
parents: 6189
diff changeset
62 :$put =line
0a4efa3d2019 updated for version 7.4.467
Bram Moolenaar <bram@vim.org>
parents: 6189
diff changeset
63 :let line="REMOVE: aaaaaaaaaaaaa"
0a4efa3d2019 updated for version 7.4.467
Bram Moolenaar <bram@vim.org>
parents: 6189
diff changeset
64 :$put =line
0a4efa3d2019 updated for version 7.4.467
Bram Moolenaar <bram@vim.org>
parents: 6189
diff changeset
65 :1/^REMOVE:
0a4efa3d2019 updated for version 7.4.467
Bram Moolenaar <bram@vim.org>
parents: 6189
diff changeset
66 0jf x:$put
6026
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 :%w! test.out
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 :qa!
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 ENDTEST
d42a1d3b74d4 updated for version 7.4.353
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 dummy text