Mercurial > vim
annotate src/testdir/test_listlbr.vim @ 15613:90f01701ecad v8.1.0814
patch 8.1.0814: :mksession cannot handle a very long 'runtimepath'
commit https://github.com/vim/vim/commit/ed18f2c03ae4786b489943cb575bb781a70356e4
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 24 20:30:52 2019 +0100
patch 8.1.0814: :mksession cannot handle a very long 'runtimepath'
Problem: :mksession cannot handle a very long 'runtimepath'. (Timothy
Madden)
Solution: Expand each part separately, instead of the whole option at once.
(Christian Brabandt, closes #3466)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 24 Jan 2019 20:45:06 +0100 |
parents | 63b02fcf1361 |
children | f38fcbf343ce |
rev | line source |
---|---|
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test for linebreak and list option (non-utf8) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 set encoding=latin1 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 scriptencoding latin1 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 if !exists("+linebreak") || !has("conceal") |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 finish |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 endif |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 source view_util.vim |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 function s:screen_lines(lnum, width) abort |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 return ScreenLines(a:lnum, a:width) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 endfunction |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 |
15406
63b02fcf1361
patch 8.1.0711: test files still use function!
Bram Moolenaar <Bram@vim.org>
parents:
11010
diff
changeset
|
16 func s:compare_lines(expect, actual) |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 call assert_equal(join(a:expect, "\n"), join(a:actual, "\n")) |
15406
63b02fcf1361
patch 8.1.0711: test files still use function!
Bram Moolenaar <Bram@vim.org>
parents:
11010
diff
changeset
|
18 endfunc |
10843
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 function s:test_windows(...) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 call NewWindow(10, 20) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 setl ts=8 sw=4 sts=4 linebreak sbr= wrap |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 exe get(a:000, 0, '') |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 endfunction |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 function s:close_windows(...) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 call CloseWindow() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 exe get(a:000, 0, '') |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 endfunction |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 func Test_set_linebreak() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 call s:test_windows('setl ts=4 sbr=+') |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 call setline(1, "\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP ") |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 let lines = s:screen_lines([1, 4], winwidth(0)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 let expect = [ |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 \ " abcdef ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 \ "+hijklmn ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 \ "+pqrstuvwxyz_1060ABC", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 \ "+DEFGHIJKLMNOP ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 \ ] |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 call s:compare_lines(expect, lines) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 call s:close_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 endfunc |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
45 func Test_linebreak_with_list() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
46 call s:test_windows('setl ts=4 sbr=+ list listchars=') |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
47 call setline(1, "\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP ") |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
48 let lines = s:screen_lines([1, 4], winwidth(0)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
49 let expect = [ |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 \ "^Iabcdef hijklmn^I ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 \ "+pqrstuvwxyz_1060ABC", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
52 \ "+DEFGHIJKLMNOP ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
53 \ "~ ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
54 \ ] |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
55 call s:compare_lines(expect, lines) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
56 call s:close_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
57 endfunc |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
58 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
59 func Test_linebreak_with_nolist() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
60 call s:test_windows('setl ts=4 sbr=+ nolist') |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 call setline(1, "\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP ") |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
62 let lines = s:screen_lines([1, 4], winwidth(0)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
63 let expect = [ |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
64 \ " abcdef ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
65 \ "+hijklmn ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
66 \ "+pqrstuvwxyz_1060ABC", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
67 \ "+DEFGHIJKLMNOP ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
68 \ ] |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
69 call s:compare_lines(expect, lines) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
70 call s:close_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
71 endfunc |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
72 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
73 func Test_should_break() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
74 call s:test_windows('setl sbr=+ nolist') |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
75 call setline(1, "1\t" . repeat('a', winwidth(0)-2)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
76 let lines = s:screen_lines([1, 4], winwidth(0)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
77 let expect = [ |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
78 \ "1 ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
79 \ "+aaaaaaaaaaaaaaaaaa ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
80 \ "~ ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
81 \ "~ ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
82 \ ] |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
83 call s:compare_lines(expect, lines) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
84 call s:close_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
85 endfunc |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
86 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
87 func Test_linebreak_with_conceal() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
88 call s:test_windows('setl cpo&vim sbr=+ list conceallevel=2 concealcursor=nv listchars=tab:ab') |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
89 call setline(1, "_S_\t bla") |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
90 syn match ConcealVar contained /_/ conceal |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
91 syn match All /.*/ contains=ConcealVar |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
92 let lines = s:screen_lines([1, 4], winwidth(0)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
93 let expect = [ |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
94 \ "Sabbbbbb bla ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
95 \ "~ ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
96 \ "~ ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
97 \ "~ ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
98 \ ] |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
99 call s:compare_lines(expect, lines) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
100 call s:close_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
101 endfunc |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
102 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
103 func Test_virtual_block() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
104 call s:test_windows('setl sbr=+') |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
105 call setline(1, [ |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
106 \ "REMOVE: this not", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
107 \ "REMOVE: aaaaaaaaaaaaa", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
108 \ ]) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
109 exe "norm! 1/^REMOVE:" |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
110 exe "norm! 0\<C-V>jf x" |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
111 $put |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
112 let lines = s:screen_lines([1, 4], winwidth(0)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
113 let expect = [ |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
114 \ "this not ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
115 \ "aaaaaaaaaaaaa ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
116 \ "REMOVE: ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
117 \ "REMOVE: ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
118 \ ] |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
119 call s:compare_lines(expect, lines) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
120 call s:close_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
121 endfunc |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
122 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
123 func Test_virtual_block_and_vbA() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
124 call s:test_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
125 call setline(1, "long line: " . repeat("foobar ", 40) . "TARGET at end") |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
126 exe "norm! $3B\<C-v>eAx\<Esc>" |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
127 let lines = s:screen_lines([1, 10], winwidth(0)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
128 let expect = [ |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
129 \ "foobar foobar ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
130 \ "foobar foobar ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
131 \ "foobar foobar ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
132 \ "foobar foobar ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
133 \ "foobar foobar ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
134 \ "foobar foobar ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
135 \ "foobar foobar ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
136 \ "foobar foobar ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
137 \ "foobar foobar ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
138 \ "foobar TARGETx at ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
139 \ ] |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
140 call s:compare_lines(expect, lines) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
141 call s:close_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
142 endfunc |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
143 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
144 func Test_virtual_char_and_block() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
145 call s:test_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
146 call setline(1, "1111-1111-1111-11-1111-1111-1111") |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
147 exe "norm! 0f-lv3lc2222\<Esc>bgj." |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
148 let lines = s:screen_lines([1, 2], winwidth(0)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
149 let expect = [ |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
150 \ "1111-2222-1111-11- ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
151 \ "1111-2222-1111 ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
152 \ ] |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
153 call s:compare_lines(expect, lines) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
154 call s:close_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
155 endfunc |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
156 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
157 func Test_undo_after_block_visual() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
158 call s:test_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
159 call setline(1, ["aaa", "aaa", "a"]) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
160 exe "norm! gg\<C-V>2j~e." |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
161 let lines = s:screen_lines([1, 3], winwidth(0)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
162 let expect = [ |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
163 \ "AaA ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
164 \ "AaA ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
165 \ "A ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
166 \ ] |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
167 call s:compare_lines(expect, lines) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
168 call s:close_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
169 endfunc |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
170 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
171 func Test_norm_after_block_visual() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
172 call s:test_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
173 call setline(1, ["abcd{ef", "ghijklm", "no}pgrs"]) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
174 exe "norm! ggf{\<C-V>\<C-V>c%" |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
175 let lines = s:screen_lines([1, 3], winwidth(0)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
176 let expect = [ |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
177 \ "abcdpgrs ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
178 \ "~ ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
179 \ "~ ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
180 \ ] |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
181 call s:compare_lines(expect, lines) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
182 call s:close_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
183 endfunc |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
184 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
185 func Test_block_replace_after_wrapping() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
186 call s:test_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
187 call setline(1, repeat("a", 150)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
188 exe "norm! 0yypk147|\<C-V>jr0" |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
189 call assert_equal(repeat("a", 146) . "0aaa", getline(1)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
190 call assert_equal(repeat("a", 146) . "0aaa", getline(2)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
191 let lines = s:screen_lines([1, 10], winwidth(0)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
192 let expect = [ |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
193 \ "aaaaaaaaaaaaaaaaaaaa", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
194 \ "aaaaaaaaaaaaaaaaaaaa", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
195 \ "aaaaaaaaaaaaaaaaaaaa", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
196 \ "aaaaaaaaaaaaaaaaaaaa", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
197 \ "aaaaaaaaaaaaaaaaaaaa", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
198 \ "aaaaaaaaaaaaaaaaaaaa", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
199 \ "aaaaaaaaaaaaaaaaaaaa", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
200 \ "aaaaaa0aaa ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
201 \ "@ ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
202 \ "@ ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
203 \ ] |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
204 call s:compare_lines(expect, lines) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
205 call s:close_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
206 endfunc |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
207 |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
208 func Test_list_with_listchars() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
209 call s:test_windows('setl list listchars=space:_,trail:-,tab:>-,eol:$') |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
210 call setline(1, "a aaaaaaaaaaaaaaaaaaaaaa\ta ") |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
211 let lines = s:screen_lines([1, 3], winwidth(0)) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
212 let expect = [ |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
213 \ "a_ ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
214 \ "aaaaaaaaaaaaaaaaaaaa", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
215 \ "aa>-----a-$ ", |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
216 \ ] |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
217 call s:compare_lines(expect, lines) |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
218 call s:close_windows() |
678edb254216
patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
219 endfunc |
11010
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
220 |
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
221 func Test_list_with_tab_and_skipping_first_chars() |
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
222 call s:test_windows('setl list listchars=tab:>- ts=70 nowrap') |
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
223 call setline(1, ["iiiiiiiiiiiiiiii\taaaaaaaaaaaaaaaaaa", "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii\taaaaaaaaaaaaaaaaaa", "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii\taaaaaaaaaaaaaaaaaa", "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii\taaaaaaaaaaaaaaaaaa"]) |
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
224 call cursor(4,64) |
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
225 norm! 2zl |
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
226 let lines = s:screen_lines([1, 4], winwidth(0)) |
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
227 let expect = [ |
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
228 \ "---------------aaaaa", |
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
229 \ "---------------aaaaa", |
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
230 \ "---------------aaaaa", |
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
231 \ "iiiiiiiii>-----aaaaa", |
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
232 \ ] |
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
233 call s:compare_lines(expect, lines) |
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
234 call s:close_windows() |
c004e17fa36b
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Christian Brabandt <cb@256bit.org>
parents:
10843
diff
changeset
|
235 endfu |