diff src/testdir/test_vartabs.vim @ 14218:539b070778b0 v8.1.0126

patch 8.1.0126: various problems with 'vartabstop' commit https://github.com/vim/vim/commit/307ac5c68e9e624ab713136d79f35bb73f780d2d Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 28 22:23:00 2018 +0200 patch 8.1.0126: various problems with 'vartabstop' Problem: Various problems with 'vartabstop'. Solution: Fix memory leak. Fix crash. Add a few more tests. (Christian Brabandt, closes #3076)
author Christian Brabandt <cb@256bit.org>
date Thu, 28 Jun 2018 22:30:06 +0200
parents 9ca8c36869ce
children dc54785f9a1d
line wrap: on
line diff
--- a/src/testdir/test_vartabs.vim
+++ b/src/testdir/test_vartabs.vim
@@ -262,21 +262,37 @@ func! Test_vartabs_breakindent()
 endfunc
 
 func! Test_vartabs_linebreak()
-  if winwidth(0) < 80
+  if winwidth(0) < 40
     return
   endif
   new
-  70vnew
+  40vnew
   %d
-  setl linebreak vartabstop=10,15,20,40
+  setl linebreak vartabstop=10,20,30,40
   call setline(1, "\tx\tx\tx\tx")
 
-  let lines = ScreenLines([1, 2], winwidth(0))
-  let expect = ['          x              x                   x                        ',
-        \       '               x                                                      ']
+  let expect = ['          x                             ',
+        \       'x                   x                   ',
+        \       'x                                       ']
+  let lines = ScreenLines([1, 3], winwidth(0))
+  call s:compare_lines(expect, lines)
+  setl list listchars=tab:>-
+  let expect = ['>---------x>------------------          ',
+        \       'x>------------------x>------------------',
+        \       'x                                       ']
+  let lines = ScreenLines([1, 3], winwidth(0))
+  call s:compare_lines(expect, lines)
+  setl linebreak vartabstop=40
+  let expect = ['>---------------------------------------',
+        \       'x>--------------------------------------',
+        \       'x>--------------------------------------',
+        \       'x>--------------------------------------',
+        \       'x                                       ']
+  let lines = ScreenLines([1, 5], winwidth(0))
   call s:compare_lines(expect, lines)
 
   " cleanup
   bw!
   bw!
+  set nolist listchars&vim
 endfunc