From 135b410607f008d3709a7b1374f3f37924eb9fe4 Mon Sep 17 00:00:00 2001 From: Sam Bingner Date: Fri, 3 Aug 2018 15:06:38 -1000 Subject: Update vim --- data/vim/patches/8.1.0150 | 692 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 692 insertions(+) create mode 100644 data/vim/patches/8.1.0150 (limited to 'data/vim/patches/8.1.0150') diff --git a/data/vim/patches/8.1.0150 b/data/vim/patches/8.1.0150 new file mode 100644 index 000000000..a9ee674fe --- /dev/null +++ b/data/vim/patches/8.1.0150 @@ -0,0 +1,692 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0150 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0150 +Problem: Insufficient test coverage for Tcl. +Solution: Add more tests. (Dominique Pelle, closes #3140) +Files: src/testdir/test_tcl.vim + + +*** ../vim-8.1.0149/src/testdir/test_tcl.vim 2017-01-29 23:18:53.000000000 +0100 +--- src/testdir/test_tcl.vim 2018-07-04 22:33:49.173452418 +0200 +*************** +*** 4,23 **** + finish + end + +! function Test_tcldo() + " Check deleting lines does not trigger ml_get error. + new + call setline(1, ['one', 'two', 'three']) + tcldo ::vim::command %d_ + bwipe! + +! " Check switching to another buffer does not trigger ml_get error. + new + let wincount = winnr('$') + call setline(1, ['one', 'two', 'three']) + tcldo ::vim::command new + call assert_equal(wincount + 1, winnr('$')) + bwipe! + bwipe! + endfunc + +--- 4,637 ---- + finish + end + +! " Helper function as there is no builtin tcleval() function similar +! " to perleval, luaevel(), pyeval(), etc. +! func TclEval(tcl_expr) +! let s = split(execute('tcl ' . a:tcl_expr), "\n") +! return (len(s) == 0) ? '' : s[-1] +! endfunc +! +! func Test_tcldo() + " Check deleting lines does not trigger ml_get error. + new + call setline(1, ['one', 'two', 'three']) + tcldo ::vim::command %d_ + bwipe! + +! " Check that switching to another buffer does not trigger ml_get error. + new + let wincount = winnr('$') + call setline(1, ['one', 'two', 'three']) + tcldo ::vim::command new + call assert_equal(wincount + 1, winnr('$')) ++ %bwipe! ++ endfunc ++ ++ " Test :tcldo with a range ++ func Test_tcldo_range() ++ new ++ call setline(1, ['line1', 'line2', 'line3', 'line4']) ++ 2,3tcldo set line [string toupper $line] ++ call assert_equal(['line1', 'LINE2', 'LINE3', 'line4'], getline(1, '$')) ++ bwipe! ++ endfunc ++ ++ " Test ::vim::beep ++ func Test_vim_beep() ++ call assert_beeps('tcl ::vim::beep') ++ call assert_fails('tcl ::vim::beep x', 'wrong # args: should be "::vim::beep"') ++ endfunc ++ ++ " Test ::vim::buffer ++ func Test_vim_buffer() ++ " Test ::vim::buffer {nr} ++ e Xfoo1 ++ call setline(1, ['foobar']) ++ let bn1 = bufnr('%') ++ let b1 = TclEval('::vim::buffer ' . bn1) ++ call assert_equal(b1, TclEval('set ::vim::current(buffer)')) ++ ++ new Xfoo2 ++ call setline(1, ['barfoo']) ++ let bn2 = bufnr('%') ++ let b2 = TclEval('::vim::buffer ' . bn2) ++ call assert_equal(b2, TclEval('set ::vim::current(buffer)')) ++ ++ call assert_match('Xfoo1$', TclEval(b1 . ' name')) ++ call assert_match('Xfoo2$', TclEval(b2 . ' name')) ++ ++ " Test ::vim::buffer exists {nr} ++ call assert_match('^[1-9]\d*$', TclEval('::vim::buffer exists ' . bn1)) ++ call assert_match('^[1-9]\d*$', TclEval('::vim::buffer exists ' . bn2)) ++ call assert_equal('0', TclEval('::vim::buffer exists 54321')) ++ ++ " Test ::vim::buffer list ++ call assert_equal('2', TclEval('llength [::vim::buffer list]')) ++ call assert_equal(b1.' '.b2, TclEval('::vim::buffer list')) ++ tcl <