summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_breakindent.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_breakindent.vim')
-rw-r--r--src/testdir/test_breakindent.vim84
1 files changed, 81 insertions, 3 deletions
diff --git a/src/testdir/test_breakindent.vim b/src/testdir/test_breakindent.vim
index ee05548..96d91c9 100644
--- a/src/testdir/test_breakindent.vim
+++ b/src/testdir/test_breakindent.vim
@@ -424,7 +424,7 @@ func Test_breakindent12()
\ "~ ",
\ ]
call s:compare_lines(expect, lines)
- call s:close_windows('set nuw=4 listchars=')
+ call s:close_windows('set nuw=4 listchars&')
endfunc
func Test_breakindent12_vartabs()
@@ -439,7 +439,7 @@ func Test_breakindent12_vartabs()
\ "~ ",
\ ]
call s:compare_lines(expect, lines)
- call s:close_windows('set nuw=4 listchars= vts&')
+ call s:close_windows('set nuw=4 listchars& vts&')
endfunc
func Test_breakindent13()
@@ -733,7 +733,7 @@ func Test_breakindent20_list()
\ "shall make no law ",
\ ]
call s:compare_lines(expect, lines)
- " set minimum indent
+ " set minimum text width
setl briopt=min:5
redraw!
let lines = s:screen_lines2(1, 6, 20)
@@ -1086,5 +1086,83 @@ func Test_linebreak_list()
bwipe!
endfunc
+func Test_breakindent_change_display_uhex()
+ call s:test_windows('setl briopt=min:0 list listchars=eol:$')
+ redraw!
+ let lines = s:screen_lines(line('.'), 20)
+ let expect = [
+ \ "^Iabcdefghijklmnopqr",
+ \ " stuvwxyzABCDEFGHIJ",
+ \ " KLMNOP$ "
+ \ ]
+ call s:compare_lines(expect, lines)
+ set display+=uhex
+ redraw!
+ let lines = s:screen_lines(line('.'), 20)
+ let expect = [
+ \ "<09>abcdefghijklmnop",
+ \ " qrstuvwxyzABCDEF",
+ \ " GHIJKLMNOP$ "
+ \ ]
+ call s:compare_lines(expect, lines)
+ set display&
+
+ call s:close_windows()
+endfunc
+
+func Test_breakindent_list_split()
+ 10new
+ 61vsplit
+ setlocal tabstop=8 breakindent list listchars=tab:<->,eol:$
+ put =s:input
+ 30vsplit
+ setlocal listchars=eol:$
+ let expect = [
+ \ "^IabcdefghijklmnopqrstuvwxyzAB|<------>abcdefghijklmnopqrstuv",
+ \ " CDEFGHIJKLMNOP$ | wxyzABCDEFGHIJKLMNOP$ ",
+ \ "~ |~ "
+ \ ]
+ redraw!
+ let lines = s:screen_lines(line('.'), 61)
+ call s:compare_lines(expect, lines)
+ wincmd p
+ redraw!
+ let lines = s:screen_lines(line('.'), 61)
+ call s:compare_lines(expect, lines)
+
+ bwipe!
+endfunc
+
+func Test_breakindent_min_with_signcol()
+ call s:test_windows('setl briopt=min:15 signcolumn=yes')
+ redraw!
+ let expect = [
+ \ " abcdefghijklmn",
+ \ " opqrstuvwxyzABC",
+ \ " DEFGHIJKLMNOP "
+ \ ]
+ let lines = s:screen_lines(line('.'), 20)
+ call s:compare_lines(expect, lines)
+ setl briopt=min:17
+ redraw!
+ let expect = [
+ \ " abcdefghijklmn",
+ \ " opqrstuvwxyzABCDE",
+ \ " FGHIJKLMNOP "
+ \ ]
+ let lines = s:screen_lines(line('.'), 20)
+ call s:compare_lines(expect, lines)
+ setl briopt=min:19
+ redraw!
+ let expect = [
+ \ " abcdefghijklmn",
+ \ " opqrstuvwxyzABCDEF",
+ \ " GHIJKLMNOP "
+ \ ]
+ let lines = s:screen_lines(line('.'), 20)
+ call s:compare_lines(expect, lines)
+
+ call s:close_windows()
+endfunc
" vim: shiftwidth=2 sts=2 expandtab