diff src/testdir/test_vartabs.vim @ 14935:dc54785f9a1d v8.1.0479

patch 8.1.0479: failure when setting 'varsofttabstop' to end in a comma commit https://github.com/vim/vim/commit/64f410742f101d7d5ea9e65503e1e0019605eaa5 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Oct 15 22:51:50 2018 +0200 patch 8.1.0479: failure when setting 'varsofttabstop' to end in a comma Problem: Failure when setting 'varsofttabstop' to end in a comma. (Ralf Schandl) Solution: Reject value with trailing command. Add test for invalid values (closes #3544)
author Bram Moolenaar <Bram@vim.org>
date Mon, 15 Oct 2018 23:00:05 +0200
parents 539b070778b0
children 3a94f7918980
line wrap: on
line diff
--- a/src/testdir/test_vartabs.vim
+++ b/src/testdir/test_vartabs.vim
@@ -5,11 +5,11 @@ if !has("vartabs")
 endif
 
 source view_util.vim
-function! s:compare_lines(expect, actual)
+func s:compare_lines(expect, actual)
   call assert_equal(join(a:expect, "\n"), join(a:actual, "\n"))
-endfunction
+endfunc
 
-func! Test_vartabs()
+func Test_vartabs()
   new
   %d
 
@@ -261,7 +261,7 @@ func! Test_vartabs_breakindent()
   bwipeout!
 endfunc
 
-func! Test_vartabs_linebreak()
+func Test_vartabs_linebreak()
   if winwidth(0) < 40
     return
   endif
@@ -296,3 +296,14 @@ func! Test_vartabs_linebreak()
   bw!
   set nolist listchars&vim
 endfunc
+
+func Test_vartabs_failures()
+  call assert_fails('set vts=8,')
+  call assert_fails('set vsts=8,')
+  call assert_fails('set vts=8,,8')
+  call assert_fails('set vsts=8,,8')
+  call assert_fails('set vts=8,,8,')
+  call assert_fails('set vsts=8,,8,')
+  call assert_fails('set vts=,8')
+  call assert_fails('set vsts=,8')
+endfunc