annotate src/testdir/test_breakindent.vim @ 25713:2eddbc3d83b9 v8.2.3392

patch 8.2.3392: augroup completion escapes regexp pattern characters Commit: https://github.com/vim/vim/commit/b4d82e2a8d610c00139a74970df772eece2daf1c Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 1 13:03:39 2021 +0200 patch 8.2.3392: augroup completion escapes regexp pattern characters Problem: augroup completion escapes regexp pattern characters. Solution: Do not escape the augroup name. (closes https://github.com/vim/vim/issues/8826)
author Bram Moolenaar <Bram@vim.org>
date Wed, 01 Sep 2021 13:15:06 +0200
parents b3d7becabe99
children b079bdc99c18
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Test for breakindent
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 "
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " Note: if you get strange failures when adding new tests, it might be that
19195
2ef19eed524a patch 8.2.0156: various typos in source files and tests
Bram Moolenaar <Bram@vim.org>
parents: 19174
diff changeset
4 " while the test is run, the breakindent caching gets in its way.
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
5 " It helps to change the tabstop setting and force a redraw (e.g. see
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 " Test_breakindent08())
17657
0da9bc55c31a patch 8.1.1826: tests use hand coded feature and option checks
Bram Moolenaar <Bram@vim.org>
parents: 16965
diff changeset
7 source check.vim
0da9bc55c31a patch 8.1.1826: tests use hand coded feature and option checks
Bram Moolenaar <Bram@vim.org>
parents: 16965
diff changeset
8 CheckOption breakindent
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
10 source view_util.vim
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
11
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 let s:input ="\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP"
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
14 func s:screen_lines(lnum, width) abort
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
15 return ScreenLines([a:lnum, a:lnum + 2], a:width)
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
16 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17
25248
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
18 func s:screen_lines2(lnums, lnume, width) abort
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
19 return ScreenLines([a:lnums, a:lnume], a:width)
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
20 endfunc
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
21
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
22 func s:compare_lines(expect, actual)
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
23 call assert_equal(join(a:expect, "\n"), join(a:actual, "\n"))
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
24 endfunc
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
25
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
26 func s:test_windows(...)
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
27 call NewWindow(10, 20)
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
28 setl ts=4 sw=4 sts=4 breakindent
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 put =s:input
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
30 exe get(a:000, 0, '')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
31 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
33 func s:close_windows(...)
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
34 call CloseWindow()
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
35 exe get(a:000, 0, '')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
36 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
38 func Test_breakindent01()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 " simple breakindent test
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
40 call s:test_windows('setl briopt=min:0')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
41 let lines = s:screen_lines(line('.'),8)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
42 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
43 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
44 \ " qrst",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
45 \ " GHIJ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
46 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
47 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48 call s:close_windows()
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
49 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
51 func Test_breakindent01_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
52 " like 01 but with vartabs feature
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
53 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
54 call s:test_windows('setl briopt=min:0 vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
55 let lines = s:screen_lines(line('.'),8)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
56 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
57 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
58 \ " qrst",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
59 \ " GHIJ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
60 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
61 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
62 call s:close_windows('set vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
63 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
64
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
65 func Test_breakindent02()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66 " simple breakindent test with showbreak set
18574
8b0114ffde2b patch 8.1.2281: 'showbreak' cannot be set for one window
Bram Moolenaar <Bram@vim.org>
parents: 18502
diff changeset
67 set sbr=>>
8b0114ffde2b patch 8.1.2281: 'showbreak' cannot be set for one window
Bram Moolenaar <Bram@vim.org>
parents: 18502
diff changeset
68 call s:test_windows('setl briopt=min:0 sbr=')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
69 let lines = s:screen_lines(line('.'),8)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
70 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
71 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
72 \ " >>qr",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
73 \ " >>EF",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
74 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
75 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
76 call s:close_windows('set sbr=')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
77 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
78
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
79 func Test_breakindent02_vartabs()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
80 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
81 " simple breakindent test with showbreak set
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
82 call s:test_windows('setl briopt=min:0 sbr=>> vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
83 let lines = s:screen_lines(line('.'),8)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
84 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
85 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
86 \ " >>qr",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
87 \ " >>EF",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
88 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
89 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
90 call s:close_windows('set sbr= vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
91 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
92
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
93 func Test_breakindent03()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
94 " simple breakindent test with showbreak set and briopt including sbr
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
95 call s:test_windows('setl briopt=sbr,min:0 sbr=++')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
96 let lines = s:screen_lines(line('.'),8)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
97 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
98 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
99 \ "++ qrst",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
100 \ "++ GHIJ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
101 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
102 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
103 " clean up
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
104 call s:close_windows('set sbr=')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
105 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
106
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
107 func Test_breakindent03_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
108 " simple breakindent test with showbreak set and briopt including sbr
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
109 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
110 call s:test_windows('setl briopt=sbr,min:0 sbr=++ vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
111 let lines = s:screen_lines(line('.'),8)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
112 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
113 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
114 \ "++ qrst",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
115 \ "++ GHIJ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
116 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
117 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
118 " clean up
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
119 call s:close_windows('set sbr= vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
120 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
121
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
122 func Test_breakindent04()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
123 " breakindent set with min width 18
18574
8b0114ffde2b patch 8.1.2281: 'showbreak' cannot be set for one window
Bram Moolenaar <Bram@vim.org>
parents: 18502
diff changeset
124 set sbr=<<<
8b0114ffde2b patch 8.1.2281: 'showbreak' cannot be set for one window
Bram Moolenaar <Bram@vim.org>
parents: 18502
diff changeset
125 call s:test_windows('setl sbr=NONE briopt=min:18')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
126 let lines = s:screen_lines(line('.'),8)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
127 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
128 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
129 \ " qrstuv",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
130 \ " IJKLMN",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
131 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
132 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
133 " clean up
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
134 call s:close_windows('set sbr=')
18574
8b0114ffde2b patch 8.1.2281: 'showbreak' cannot be set for one window
Bram Moolenaar <Bram@vim.org>
parents: 18502
diff changeset
135 set sbr=
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
136 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
137
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
138 func Test_breakindent04_vartabs()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
139 " breakindent set with min width 18
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
140 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
141 call s:test_windows('setl sbr= briopt=min:18 vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
142 let lines = s:screen_lines(line('.'),8)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
143 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
144 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
145 \ " qrstuv",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
146 \ " IJKLMN",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
147 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
148 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
149 " clean up
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
150 call s:close_windows('set sbr= vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
151 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
152
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
153 func Test_breakindent05()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
154 " breakindent set and shift by 2
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
155 call s:test_windows('setl briopt=shift:2,min:0')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
156 let lines = s:screen_lines(line('.'),8)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
157 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
158 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
159 \ " qr",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
160 \ " EF",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
161 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
162 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
163 call s:close_windows()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
164 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
165
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
166 func Test_breakindent05_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
167 " breakindent set and shift by 2
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
168 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
169 call s:test_windows('setl briopt=shift:2,min:0 vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
170 let lines = s:screen_lines(line('.'),8)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
171 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
172 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
173 \ " qr",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
174 \ " EF",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
175 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
176 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
177 call s:close_windows('set vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
178 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
179
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
180 func Test_breakindent06()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
181 " breakindent set and shift by -1
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
182 call s:test_windows('setl briopt=shift:-1,min:0')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
183 let lines = s:screen_lines(line('.'),8)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
184 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
185 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
186 \ " qrstu",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
187 \ " HIJKL",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
188 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
189 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
190 call s:close_windows()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
191 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
192
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
193 func Test_breakindent06_vartabs()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
194 " breakindent set and shift by -1
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
195 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
196 call s:test_windows('setl briopt=shift:-1,min:0 vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
197 let lines = s:screen_lines(line('.'),8)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
198 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
199 \ " abcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
200 \ " qrstu",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
201 \ " HIJKL",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
202 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
203 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
204 call s:close_windows('set vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
205 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
206
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
207 func Test_breakindent07()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
208 " breakindent set and shift by 1, Number set sbr=? and briopt:sbr
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
209 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4 cpo+=n')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
210 let lines = s:screen_lines(line('.'),10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
211 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
212 \ " 2 ab",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
213 \ "? m",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
214 \ "? x",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
215 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
216 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
217 " clean up
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
218 call s:close_windows('set sbr= cpo-=n')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
219 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
220
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
221 func Test_breakindent07_vartabs()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
222 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
223 " breakindent set and shift by 1, Number set sbr=? and briopt:sbr
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
224 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4 cpo+=n vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
225 let lines = s:screen_lines(line('.'),10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
226 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
227 \ " 2 ab",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
228 \ "? m",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
229 \ "? x",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
230 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
231 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
232 " clean up
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
233 call s:close_windows('set sbr= cpo-=n vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
234 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
235
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
236 func Test_breakindent07a()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
237 " breakindent set and shift by 1, Number set sbr=? and briopt:sbr
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
238 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
239 let lines = s:screen_lines(line('.'),10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
240 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
241 \ " 2 ab",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
242 \ " ? m",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
243 \ " ? x",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
244 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
245 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
246 " clean up
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
247 call s:close_windows('set sbr=')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
248 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
249
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
250 func Test_breakindent07a_vartabs()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
251 CheckFeature vartabs
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
252 " breakindent set and shift by 1, Number set sbr=? and briopt:sbr
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
253 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4 vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
254 let lines = s:screen_lines(line('.'),10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
255 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
256 \ " 2 ab",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
257 \ " ? m",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
258 \ " ? x",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
259 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
260 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
261 " clean up
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
262 call s:close_windows('set sbr= vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
263 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
264
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
265 func Test_breakindent08()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
266 " breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
267 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list cpo+=n ts=4')
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
268 " make sure, cache is invalidated!
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
269 set ts=8
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
270 redraw!
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
271 set ts=4
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
272 redraw!
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
273 let lines = s:screen_lines(line('.'),10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
274 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
275 \ " 2 ^Iabcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
276 \ "# opq",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
277 \ "# BCD",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
278 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
279 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
280 call s:close_windows('set sbr= cpo-=n')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
281 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
282
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
283 func Test_breakindent08_vartabs()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
284 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
285 " breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
286 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list cpo+=n ts=4 vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
287 " make sure, cache is invalidated!
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
288 set ts=8
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
289 redraw!
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
290 set ts=4
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
291 redraw!
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
292 let lines = s:screen_lines(line('.'),10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
293 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
294 \ " 2 ^Iabcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
295 \ "# opq",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
296 \ "# BCD",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
297 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
298 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
299 call s:close_windows('set sbr= cpo-=n vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
300 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
301
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
302 func Test_breakindent08a()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
303 " breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
304 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
305 let lines = s:screen_lines(line('.'),10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
306 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
307 \ " 2 ^Iabcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
308 \ " # opq",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
309 \ " # BCD",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
310 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
311 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
312 call s:close_windows('set sbr=')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
313 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
314
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
315 func Test_breakindent08a_vartabs()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
316 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
317 " breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
318 call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
319 let lines = s:screen_lines(line('.'),10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
320 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
321 \ " 2 ^Iabcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
322 \ " # opq",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
323 \ " # BCD",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
324 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
325 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
326 call s:close_windows('set sbr= vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
327 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
328
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
329 func Test_breakindent09()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
330 " breakindent set and shift by 1, Number and list set sbr=#
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
331 call s:test_windows('setl briopt=shift:1,min:0 nu nuw=4 sbr=# list')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
332 let lines = s:screen_lines(line('.'),10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
333 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
334 \ " 2 ^Iabcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
335 \ " #op",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
336 \ " #AB",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
337 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
338 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
339 call s:close_windows('set sbr=')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
340 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
341
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
342 func Test_breakindent09_vartabs()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
343 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
344 " breakindent set and shift by 1, Number and list set sbr=#
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
345 call s:test_windows('setl briopt=shift:1,min:0 nu nuw=4 sbr=# list vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
346 let lines = s:screen_lines(line('.'),10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
347 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
348 \ " 2 ^Iabcd",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
349 \ " #op",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
350 \ " #AB",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
351 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
352 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
353 call s:close_windows('set sbr= vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
354 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
355
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
356 func Test_breakindent10()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
357 " breakindent set, Number set sbr=~
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
358 call s:test_windows('setl cpo+=n sbr=~ nu nuw=4 nolist briopt=sbr,min:0')
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
359 " make sure, cache is invalidated!
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
360 set ts=8
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
361 redraw!
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
362 set ts=4
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
363 redraw!
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
364 let lines = s:screen_lines(line('.'),10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
365 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
366 \ " 2 ab",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
367 \ "~ mn",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
368 \ "~ yz",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
369 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
370 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
371 call s:close_windows('set sbr= cpo-=n')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
372 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
373
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
374 func Test_breakindent10_vartabs()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
375 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
376 " breakindent set, Number set sbr=~
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
377 call s:test_windows('setl cpo+=n sbr=~ nu nuw=4 nolist briopt=sbr,min:0 vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
378 " make sure, cache is invalidated!
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
379 set ts=8
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
380 redraw!
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
381 set ts=4
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
382 redraw!
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
383 let lines = s:screen_lines(line('.'),10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
384 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
385 \ " 2 ab",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
386 \ "~ mn",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
387 \ "~ yz",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
388 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
389 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
390 call s:close_windows('set sbr= cpo-=n vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
391 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
392
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
393 func Test_breakindent11()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
394 " test strdisplaywidth()
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
395 call s:test_windows('setl cpo-=n sbr=>> nu nuw=4 nolist briopt= ts=4')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
396 let text = getline(2)
17914
af3d441845cd patch 8.1.1953: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17657
diff changeset
397 let width = strlen(text[1:]) + indent(2) + strlen(&sbr) * 3 " text wraps 3 times
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
398 call assert_equal(width, strdisplaywidth(text))
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
399 call s:close_windows('set sbr=')
19783
546bdeef35f1 patch 8.2.0448: various functions not properly tested
Bram Moolenaar <Bram@vim.org>
parents: 19501
diff changeset
400 call assert_equal(4, strdisplaywidth("\t", 4))
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
401 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
402
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
403 func Test_breakindent11_vartabs()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
404 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
405 " test strdisplaywidth()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
406 call s:test_windows('setl cpo-=n sbr=>> nu nuw=4 nolist briopt= ts=4 vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
407 let text = getline(2)
17914
af3d441845cd patch 8.1.1953: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17657
diff changeset
408 let width = strlen(text[1:]) + 2->indent() + strlen(&sbr) * 3 " text wraps 3 times
18017
988e5a868b60 patch 8.1.2004: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
409 call assert_equal(width, text->strdisplaywidth())
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
410 call s:close_windows('set sbr= vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
411 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
412
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
413 func Test_breakindent12()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
414 " test breakindent with long indent
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
415 let s:input = "\t\t\t\t\t{"
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
416 call s:test_windows('setl breakindent linebreak briopt=min:10 nu numberwidth=3 ts=4 list listchars=tab:>-')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
417 let lines = s:screen_lines(2,16)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
418 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
419 \ " 2 >--->--->--->",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
420 \ " ---{ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
421 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
422 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
423 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
424 call s:close_windows('set nuw=4 listchars=')
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
425 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
426
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
427 func Test_breakindent12_vartabs()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
428 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
429 " test breakindent with long indent
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
430 let s:input = "\t\t\t\t\t{"
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
431 call s:test_windows('setl breakindent linebreak briopt=min:10 nu numberwidth=3 ts=4 list listchars=tab:>- vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
432 let lines = s:screen_lines(2,16)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
433 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
434 \ " 2 >--->--->--->",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
435 \ " ---{ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
436 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
437 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
438 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
439 call s:close_windows('set nuw=4 listchars= vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
440 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
441
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
442 func Test_breakindent13()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
443 let s:input = ""
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
444 call s:test_windows('setl breakindent briopt=min:10 ts=8')
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
445 vert resize 20
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
446 call setline(1, [" a\tb\tc\td\te", " z y x w v"])
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
447 1
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
448 norm! fbgj"ayl
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
449 2
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
450 norm! fygj"byl
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
451 call assert_equal('d', @a)
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
452 call assert_equal('w', @b)
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
453 call s:close_windows()
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
454 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
455
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
456 func Test_breakindent13_vartabs()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
457 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
458 let s:input = ""
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
459 call s:test_windows('setl breakindent briopt=min:10 ts=8 vts=8')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
460 vert resize 20
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
461 call setline(1, [" a\tb\tc\td\te", " z y x w v"])
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
462 1
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
463 norm! fbgj"ayl
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
464 2
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
465 norm! fygj"byl
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
466 call assert_equal('d', @a)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
467 call assert_equal('w', @b)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
468 call s:close_windows('set vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
469 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
470
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
471 func Test_breakindent14()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
472 let s:input = ""
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
473 call s:test_windows('setl breakindent briopt= ts=8')
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
474 vert resize 30
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
475 norm! 3a1234567890
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
476 norm! a abcde
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
477 exec "norm! 0\<C-V>tex"
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
478 let lines = s:screen_lines(line('.'),8)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
479 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
480 \ "e ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
481 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
482 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
483 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
484 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
485 call s:close_windows()
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
486 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
487
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
488 func Test_breakindent14_vartabs()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
489 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
490 let s:input = ""
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
491 call s:test_windows('setl breakindent briopt= ts=8 vts=8')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
492 vert resize 30
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
493 norm! 3a1234567890
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
494 norm! a abcde
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
495 exec "norm! 0\<C-V>tex"
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
496 let lines = s:screen_lines(line('.'),8)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
497 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
498 \ "e ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
499 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
500 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
501 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
502 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
503 call s:close_windows('set vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
504 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
505
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
506 func Test_breakindent15()
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
507 let s:input = ""
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
508 call s:test_windows('setl breakindent briopt= ts=8 sw=8')
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
509 vert resize 30
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
510 norm! 4a1234567890
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
511 exe "normal! >>\<C-V>3f0x"
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
512 let lines = s:screen_lines(line('.'),20)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
513 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
514 \ " 1234567890 ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
515 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
516 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
517 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
518 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
519 call s:close_windows()
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
520 endfunc
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
521
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
522 func Test_breakindent15_vartabs()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
523 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
524 let s:input = ""
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
525 call s:test_windows('setl breakindent briopt= ts=8 sw=8 vts=8')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
526 vert resize 30
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
527 norm! 4a1234567890
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
528 exe "normal! >>\<C-V>3f0x"
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
529 let lines = s:screen_lines(line('.'),20)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
530 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
531 \ " 1234567890 ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
532 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
533 \ "~ ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
534 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
535 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
536 call s:close_windows('set vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
537 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
538
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
539 func Test_breakindent16()
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
540 " Check that overlong lines are indented correctly.
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
541 let s:input = ""
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
542 call s:test_windows('setl breakindent briopt=min:0 ts=4')
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
543 call setline(1, "\t".repeat("1234567890", 10))
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
544 resize 6
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
545 norm! 1gg$
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
546 redraw!
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
547 let lines = s:screen_lines(1,10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
548 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
549 \ " 789012",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
550 \ " 345678",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
551 \ " 901234",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
552 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
553 call s:compare_lines(expect, lines)
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
554 let lines = s:screen_lines(4,10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
555 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
556 \ " 567890",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
557 \ " 123456",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
558 \ " 7890 ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
559 \ ]
10843
678edb254216 patch 8.0.0311: linebreak tests are old style
Christian Brabandt <cb@256bit.org>
parents: 10392
diff changeset
560 call s:compare_lines(expect, lines)
10392
957a1d560bda commit https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
561 call s:close_windows()
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
562 endfunc
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
563
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
564 func Test_breakindent16_vartabs()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
565 CheckFeature vartabs
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
566 " Check that overlong lines are indented correctly.
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
567 let s:input = ""
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
568 call s:test_windows('setl breakindent briopt=min:0 ts=4 vts=4')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
569 call setline(1, "\t".repeat("1234567890", 10))
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
570 resize 6
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
571 norm! 1gg$
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
572 redraw!
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
573 let lines = s:screen_lines(1,10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
574 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
575 \ " 789012",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
576 \ " 345678",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
577 \ " 901234",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
578 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
579 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
580 let lines = s:screen_lines(4,10)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
581 let expect = [
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
582 \ " 567890",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
583 \ " 123456",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
584 \ " 7890 ",
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
585 \ ]
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
586 call s:compare_lines(expect, lines)
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
587 call s:close_windows('set vts&')
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 11010
diff changeset
588 endfunc
18502
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
589
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
590 func Test_breakindent17_vartabs()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
591 CheckFeature vartabs
18502
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
592 let s:input = ""
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
593 call s:test_windows('setl breakindent list listchars=tab:<-> showbreak=+++')
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
594 call setline(1, "\t" . repeat('a', 63))
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
595 vert resize 30
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
596 norm! 1gg$
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
597 redraw!
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
598 let lines = s:screen_lines(1, 30)
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
599 let expect = [
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
600 \ "<-->aaaaaaaaaaaaaaaaaaaaaaaaaa",
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
601 \ " +++aaaaaaaaaaaaaaaaaaaaaaa",
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
602 \ " +++aaaaaaaaaaaaaa ",
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
603 \ ]
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
604 call s:compare_lines(expect, lines)
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
605 call s:close_windows('set breakindent& list& listchars& showbreak&')
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
606 endfunc
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
607
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
608 func Test_breakindent18_vartabs()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20423
diff changeset
609 CheckFeature vartabs
18502
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
610 let s:input = ""
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
611 call s:test_windows('setl breakindent list listchars=tab:<->')
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
612 call setline(1, "\t" . repeat('a', 63))
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
613 vert resize 30
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
614 norm! 1gg$
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
615 redraw!
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
616 let lines = s:screen_lines(1, 30)
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
617 let expect = [
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
618 \ "<-->aaaaaaaaaaaaaaaaaaaaaaaaaa",
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
619 \ " aaaaaaaaaaaaaaaaaaaaaaaaaa",
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
620 \ " aaaaaaaaaaa ",
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
621 \ ]
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
622 call s:compare_lines(expect, lines)
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
623 call s:close_windows('set breakindent& list& listchars&')
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
624 endfunc
3ebb15e3c28d patch 8.1.2245: third character of 'listchars' tab shows in wrong place
Bram Moolenaar <Bram@vim.org>
parents: 18017
diff changeset
625
19174
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
626 func Test_breakindent19_sbr_nextpage()
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
627 let s:input = ""
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
628 call s:test_windows('setl breakindent briopt=shift:2,sbr,min:18 sbr=>')
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
629 call setline(1, repeat('a', 200))
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
630 norm! 1gg
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
631 redraw!
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
632 let lines = s:screen_lines(1, 20)
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
633 let expect = [
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
634 \ "aaaaaaaaaaaaaaaaaaaa",
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
635 \ "> aaaaaaaaaaaaaaaaaa",
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
636 \ "> aaaaaaaaaaaaaaaaaa",
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
637 \ ]
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
638 call s:compare_lines(expect, lines)
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
639 " Scroll down one screen line
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
640 setl scrolloff=5
23907
c8aa6d26e6e1 patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents: 23905
diff changeset
641 norm! 5gj
19174
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
642 let lines = s:screen_lines(1, 20)
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
643 let expect = [
23907
c8aa6d26e6e1 patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents: 23905
diff changeset
644 \ "aaaaaaaaaaaaaaaaaaaa",
19174
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
645 \ "> aaaaaaaaaaaaaaaaaa",
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
646 \ "> aaaaaaaaaaaaaaaaaa",
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
647 \ ]
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
648 call s:compare_lines(expect, lines)
23907
c8aa6d26e6e1 patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents: 23905
diff changeset
649 redraw!
c8aa6d26e6e1 patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents: 23905
diff changeset
650 " moving the cursor doesn't change the text offset
c8aa6d26e6e1 patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents: 23905
diff changeset
651 norm! l
c8aa6d26e6e1 patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents: 23905
diff changeset
652 redraw!
c8aa6d26e6e1 patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents: 23905
diff changeset
653 let lines = s:screen_lines(1, 20)
c8aa6d26e6e1 patch 8.2.2496: insufficien testing for text jumping fix
Bram Moolenaar <Bram@vim.org>
parents: 23905
diff changeset
654 call s:compare_lines(expect, lines)
19501
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
655
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
656 setl breakindent briopt=min:18 sbr=>
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
657 norm! 5gj
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
658 let lines = s:screen_lines(1, 20)
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
659 let expect = [
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
660 \ ">aaaaaaaaaaaaaaaaaaa",
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
661 \ ">aaaaaaaaaaaaaaaaaaa",
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
662 \ ">aaaaaaaaaaaaaaaaaaa",
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
663 \ ]
f872daa2031b patch 8.2.0308: 'showbreak' does not work for a very long line
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
664 call s:compare_lines(expect, lines)
19174
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
665 call s:close_windows('set breakindent& briopt& sbr&')
d5b793803236 patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are set
Bram Moolenaar <Bram@vim.org>
parents: 18574
diff changeset
666 endfunc
19783
546bdeef35f1 patch 8.2.0448: various functions not properly tested
Bram Moolenaar <Bram@vim.org>
parents: 19501
diff changeset
667
20423
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
668 func Test_breakindent20_cpo_n_nextpage()
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
669 let s:input = ""
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
670 call s:test_windows('setl breakindent briopt=min:14 cpo+=n number')
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
671 call setline(1, repeat('a', 200))
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
672 norm! 1gg
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
673 redraw!
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
674 let lines = s:screen_lines(1, 20)
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
675 let expect = [
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
676 \ " 1 aaaaaaaaaaaaaaaa",
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
677 \ " aaaaaaaaaaaaaaaa",
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
678 \ " aaaaaaaaaaaaaaaa",
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
679 \ ]
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
680 call s:compare_lines(expect, lines)
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
681 " Scroll down one screen line
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
682 setl scrolloff=5
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
683 norm! 5gj
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
684 redraw!
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
685 let lines = s:screen_lines(1, 20)
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
686 let expect = [
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
687 \ "--1 aaaaaaaaaaaaaaaa",
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
688 \ " aaaaaaaaaaaaaaaa",
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
689 \ " aaaaaaaaaaaaaaaa",
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
690 \ ]
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
691 call s:compare_lines(expect, lines)
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
692
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
693 setl briopt+=shift:2
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
694 norm! 1gg
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
695 let lines = s:screen_lines(1, 20)
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
696 let expect = [
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
697 \ " 1 aaaaaaaaaaaaaaaa",
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
698 \ " aaaaaaaaaaaaaa",
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
699 \ " aaaaaaaaaaaaaa",
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
700 \ ]
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
701 call s:compare_lines(expect, lines)
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
702 " Scroll down one screen line
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
703 norm! 5gj
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
704 let lines = s:screen_lines(1, 20)
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
705 let expect = [
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
706 \ "--1 aaaaaaaaaaaaaa",
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
707 \ " aaaaaaaaaaaaaa",
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
708 \ " aaaaaaaaaaaaaa",
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
709 \ ]
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
710 call s:compare_lines(expect, lines)
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
711
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
712 call s:close_windows('set breakindent& briopt& cpo& number&')
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
713 endfunc
8c98c74176ac patch 8.2.0766: display error when using 'number' and 'breakindent'
Bram Moolenaar <Bram@vim.org>
parents: 19783
diff changeset
714
25248
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
715 func Test_breakindent20_list()
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
716 call s:test_windows('setl breakindent breakindentopt= linebreak')
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
717 " default:
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
718 call setline(1, [' 1. Congress shall make no law',
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
719 \ ' 2.) Congress shall make no law',
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
720 \ ' 3.] Congress shall make no law'])
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
721 norm! 1gg
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
722 redraw!
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
723 let lines = s:screen_lines2(1, 6, 20)
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
724 let expect = [
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
725 \ " 1. Congress ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
726 \ "shall make no law ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
727 \ " 2.) Congress ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
728 \ "shall make no law ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
729 \ " 3.] Congress ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
730 \ "shall make no law ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
731 \ ]
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
732 call s:compare_lines(expect, lines)
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
733 " set mininum indent
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
734 setl briopt=min:5
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
735 redraw!
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
736 let lines = s:screen_lines2(1, 6, 20)
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
737 let expect = [
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
738 \ " 1. Congress ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
739 \ " shall make no law ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
740 \ " 2.) Congress ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
741 \ " shall make no law ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
742 \ " 3.] Congress ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
743 \ " shall make no law ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
744 \ ]
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
745 call s:compare_lines(expect, lines)
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
746 " set additional handing indent
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
747 setl briopt+=list:4
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
748 redraw!
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
749 let expect = [
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
750 \ " 1. Congress ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
751 \ " shall make no ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
752 \ " law ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
753 \ " 2.) Congress ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
754 \ " shall make no ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
755 \ " law ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
756 \ " 3.] Congress ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
757 \ " shall make no ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
758 \ " law ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
759 \ ]
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
760 let lines = s:screen_lines2(1, 9, 20)
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
761 call s:compare_lines(expect, lines)
25322
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
762
25248
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
763 " reset linebreak option
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
764 " Note: it indents by one additional
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
765 " space, because of the leading space.
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
766 setl linebreak&vim list listchars=eol:$,space:_
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
767 redraw!
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
768 let expect = [
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
769 \ "__1.__Congress_shall",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
770 \ " _make_no_law$ ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
771 \ "__2.)_Congress_shall",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
772 \ " _make_no_law$ ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
773 \ "__3.]_Congress_shall",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
774 \ " _make_no_law$ ",
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
775 \ ]
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
776 let lines = s:screen_lines2(1, 6, 20)
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
777 call s:compare_lines(expect, lines)
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
778
25322
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
779 " check formatlistpat indent
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
780 setl briopt=min:5,list:-1
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
781 setl linebreak list&vim listchars&vim
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
782 let &l:flp = '^\s*\d\+\.\?[\]:)}\t ]\s*'
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
783 redraw!
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
784 let expect = [
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
785 \ " 1. Congress ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
786 \ " shall make no ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
787 \ " law ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
788 \ " 2.) Congress ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
789 \ " shall make no ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
790 \ " law ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
791 \ " 3.] Congress ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
792 \ " shall make no ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
793 \ " law ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
794 \ ]
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
795 let lines = s:screen_lines2(1, 9, 20)
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
796 call s:compare_lines(expect, lines)
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
797 " check formatlistpat indent with different list levels
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
798 let &l:flp = '^\s*\*\+\s\+'
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
799 redraw!
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
800 %delete _
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
801 call setline(1, ['* Congress shall make no law',
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
802 \ '*** Congress shall make no law',
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
803 \ '**** Congress shall make no law'])
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
804 norm! 1gg
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
805 let expect = [
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
806 \ "* Congress shall ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
807 \ " make no law ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
808 \ "*** Congress shall ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
809 \ " make no law ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
810 \ "**** Congress shall ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
811 \ " make no law ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
812 \ ]
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
813 let lines = s:screen_lines2(1, 6, 20)
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
814 call s:compare_lines(expect, lines)
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
815
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
816 " check formatlistpat indent with different list level
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
817 " showbreak and sbr
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
818 setl briopt=min:5,sbr,list:-1,shift:2
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
819 setl showbreak=>
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
820 redraw!
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
821 let expect = [
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
822 \ "* Congress shall ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
823 \ "> make no law ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
824 \ "*** Congress shall ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
825 \ "> make no law ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
826 \ "**** Congress shall ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
827 \ "> make no law ",
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
828 \ ]
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
829 let lines = s:screen_lines2(1, 6, 20)
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
830 call s:compare_lines(expect, lines)
b3d7becabe99 patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Bram Moolenaar <Bram@vim.org>
parents: 25248
diff changeset
831 call s:close_windows('set breakindent& briopt& linebreak& list& listchars& showbreak&')
25248
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
832 endfunc
cf0774d010b7 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Bram Moolenaar <Bram@vim.org>
parents: 23907
diff changeset
833
19783
546bdeef35f1 patch 8.2.0448: various functions not properly tested
Bram Moolenaar <Bram@vim.org>
parents: 19501
diff changeset
834 " vim: shiftwidth=2 sts=2 expandtab