Mercurial > vim
annotate src/testdir/test_listlbr.in @ 8465:5927180d0b4d v7.4.1523
commit https://github.com/vim/vim/commit/0622732b32ff4a883e4f490a1b38ada539da8ba2
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Mar 8 20:58:29 2016 +0100
patch 7.4.1523
Problem: Writing channel to a file fails on MS-Windows.
Solution: Disable it for now.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 08 Mar 2016 21:00:04 +0100 |
parents | 68f2cac6b0db |
children |
rev | line source |
---|---|
6062 | 1 Test for linebreak and list option (non-utf8) |
6026 | 2 |
3 STARTTEST | |
4 :so small.vim | |
6266 | 5 :if !exists("+linebreak") || !has("conceal") | e! test.ok | w! test.out | qa! | endif |
6026 | 6 :10new|:vsp|:vert resize 20 |
6062 | 7 :put =\"\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP \" |
6026 | 8 :norm! zt |
9 :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap | |
10 :fu! ScreenChar(width) | |
11 : let c='' | |
12 : for j in range(1,4) | |
13 : for i in range(1,a:width) | |
14 : let c.=nr2char(screenchar(j, i)) | |
15 : endfor | |
16 : let c.="\n" | |
17 : endfor | |
18 : return c | |
19 :endfu | |
20 :fu! DoRecordScreen() | |
21 : wincmd l | |
22 : $put =printf(\"\n%s\", g:test) | |
23 : $put =g:line | |
24 : wincmd p | |
25 :endfu | |
7344
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
26 :" |
6026 | 27 :let g:test="Test 1: set linebreak" |
28 :redraw! | |
29 :let line=ScreenChar(winwidth(0)) | |
30 :call DoRecordScreen() | |
7344
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
31 :" |
6026 | 32 :let g:test="Test 2: set linebreak + set list" |
33 :set linebreak list listchars= | |
34 :redraw! | |
35 :let line=ScreenChar(winwidth(0)) | |
36 :call DoRecordScreen() | |
7344
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
37 :" |
6062 | 38 :let g:test ="Test 3: set linebreak nolist" |
6026 | 39 :set nolist linebreak |
40 :redraw! | |
41 :let line=ScreenChar(winwidth(0)) | |
42 :call DoRecordScreen() | |
7344
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
43 :" |
6062 | 44 :let g:test ="Test 4: set linebreak with tab and 1 line as long as screen: should break!" |
6026 | 45 :set nolist linebreak ts=8 |
46 :let line="1\t".repeat('a', winwidth(0)-2) | |
47 :$put =line | |
48 :$ | |
49 :norm! zt | |
50 :redraw! | |
51 :let line=ScreenChar(winwidth(0)) | |
52 :call DoRecordScreen() | |
6172 | 53 :let line="_S_\t bla" |
54 :$put =line | |
55 :$ | |
56 :norm! zt | |
7344
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
57 :" |
6172 | 58 :let g:test ="Test 5: set linebreak with conceal and set list and tab displayed by different char (line may not be truncated)" |
59 :set cpo&vim list linebreak conceallevel=2 concealcursor=nv listchars=tab:ab | |
60 :syn match ConcealVar contained /_/ conceal | |
61 :syn match All /.*/ contains=ConcealVar | |
62 :let line=ScreenChar(winwidth(0)) | |
63 :call DoRecordScreen() | |
6266 | 64 :set cpo&vim linebreak |
7344
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
65 :" |
6266 | 66 :let g:test ="Test 6: set linebreak with visual block mode" |
67 :let line="REMOVE: this not" | |
6866 | 68 :$put =g:test |
6266 | 69 :$put =line |
70 :let line="REMOVE: aaaaaaaaaaaaa" | |
71 :$put =line | |
72 :1/^REMOVE: | |
73 0jf x:$put | |
6866 | 74 :set cpo&vim linebreak |
7344
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
75 :" |
6866 | 76 :let g:test ="Test 7: set linebreak with visual block mode and v_b_A" |
77 :$put =g:test | |
78 Golong line: 40afoobar aTARGET at end | |
79 :exe "norm! $3B\<C-v>eAx\<Esc>" | |
80 :set cpo&vim linebreak sbr= | |
7344
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
81 :" |
6866 | 82 :let g:test ="Test 8: set linebreak with visual char mode and changing block" |
83 :$put =g:test | |
84 Go1111-1111-1111-11-1111-1111-11110f-lv3lc2222bgj. | |
7344
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
85 :" |
6961 | 86 :let g:test ="Test 9: using redo after block visual mode" |
87 :$put =g:test | |
88 Go | |
89 aaa | |
90 aaa | |
91 a2k2j~e. | |
7344
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
92 :" |
7001 | 93 :let g:test ="Test 10: using normal commands after block-visual" |
94 :$put =g:test | |
95 :set linebreak | |
96 Go | |
97 abcd{ef | |
98 ghijklm | |
99 no}pqrs2k0f{c% | |
7344
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
100 :" |
7143
fe6d525d12f4
commit https://github.com/vim/vim/commit/10ad1d90da8c464e1bf08bf23d92d4888378a8a1
Christian Brabandt <cb@256bit.org>
parents:
7001
diff
changeset
|
101 :let g:test ="Test 11: using block replace mode after wrapping" |
fe6d525d12f4
commit https://github.com/vim/vim/commit/10ad1d90da8c464e1bf08bf23d92d4888378a8a1
Christian Brabandt <cb@256bit.org>
parents:
7001
diff
changeset
|
102 :$put =g:test |
fe6d525d12f4
commit https://github.com/vim/vim/commit/10ad1d90da8c464e1bf08bf23d92d4888378a8a1
Christian Brabandt <cb@256bit.org>
parents:
7001
diff
changeset
|
103 :set linebreak wrap |
fe6d525d12f4
commit https://github.com/vim/vim/commit/10ad1d90da8c464e1bf08bf23d92d4888378a8a1
Christian Brabandt <cb@256bit.org>
parents:
7001
diff
changeset
|
104 Go150aayypk147|jr0 |
7344
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
105 :" |
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
106 :let g:test ="Test 12: set linebreak list listchars=space:_,tab:>-,tail:-,eol:$" |
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
107 :set list listchars=space:_,trail:-,tab:>-,eol:$ |
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
108 :$put =g:test |
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
109 :let line="a aaaaaaaaaaaaaaaaaaaaaa\ta " |
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
110 :$put =line |
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
111 :$ |
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
112 :norm! zt |
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
113 :redraw! |
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
114 :let line=ScreenChar(winwidth(0)) |
68f2cac6b0db
commit https://github.com/vim/vim/commit/9bc01ebb957d2b30d57bd30d7aee6f1df2a336b0
Christian Brabandt <cb@256bit.org>
parents:
7143
diff
changeset
|
115 :call DoRecordScreen() |
6026 | 116 :%w! test.out |
117 :qa! | |
118 ENDTEST | |
119 dummy text |