To: vim_dev@googlegroups.com Subject: Patch 8.1.2264 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2264 Problem: There are two test files for :let. Solution: Merge the two files. Files: src/testdir/test_assign.vim, src/testdir/test_let.vim, src/testdir/Make_all.mak, src/testdir/test_alot.vim *** ../vim-8.1.2263/src/testdir/test_assign.vim 2019-01-13 15:15:54.384762935 +0100 --- src/testdir/test_assign.vim 1970-01-01 01:00:00.000000000 +0100 *************** *** 1,53 **** - " Test for assignment - - func Test_no_type_checking() - let v = 1 - let v = [1,2,3] - let v = {'a': 1, 'b': 2} - let v = 3.4 - let v = 'hello' - endfunc - - func Test_let_termcap() - " Terminal code - let old_t_te = &t_te - let &t_te = "\[yes;" - call assert_match('t_te.*^[[yes;', execute("set termcap")) - let &t_te = old_t_te - - if exists("+t_k1") - " Key code - let old_t_k1 = &t_k1 - let &t_k1 = "that" - call assert_match('t_k1.*that', execute("set termcap")) - let &t_k1 = old_t_k1 - endif - - call assert_fails('let x = &t_xx', 'E113') - let &t_xx = "yes" - call assert_equal("yes", &t_xx) - let &t_xx = "" - call assert_fails('let x = &t_xx', 'E113') - endfunc - - func Test_let_option_error() - let _w = &tw - let &tw = 80 - call assert_fails('let &tw .= 1', 'E734') - call assert_equal(80, &tw) - let &tw = _w - - let _w = &fillchars - let &fillchars = "vert:|" - call assert_fails('let &fillchars += "diff:-"', 'E734') - call assert_equal("vert:|", &fillchars) - let &fillchars = _w - endfunc - - func Test_let_errors() - let s = 'abcd' - call assert_fails('let s[1] = 5', 'E689:') - - let l = [1, 2, 3] - call assert_fails('let l[:] = 5', 'E709:') - endfunc --- 0 ---- *** ../vim-8.1.2263/src/testdir/test_let.vim 2019-11-06 15:02:46.189199092 +0100 --- src/testdir/test_let.vim 2019-11-06 15:20:57.236671591 +0100 *************** *** 152,157 **** --- 152,209 ---- call assert_equal('ĀĒĪŌŪあいうえお', $a) endfunc + func Test_let_no_type_checking() + let v = 1 + let v = [1,2,3] + let v = {'a': 1, 'b': 2} + let v = 3.4 + let v = 'hello' + endfunc + + func Test_let_termcap() + " Terminal code + let old_t_te = &t_te + let &t_te = "\[yes;" + call assert_match('t_te.*^[[yes;', execute("set termcap")) + let &t_te = old_t_te + + if exists("+t_k1") + " Key code + let old_t_k1 = &t_k1 + let &t_k1 = "that" + call assert_match('t_k1.*that', execute("set termcap")) + let &t_k1 = old_t_k1 + endif + + call assert_fails('let x = &t_xx', 'E113') + let &t_xx = "yes" + call assert_equal("yes", &t_xx) + let &t_xx = "" + call assert_fails('let x = &t_xx', 'E113') + endfunc + + func Test_let_option_error() + let _w = &tw + let &tw = 80 + call assert_fails('let &tw .= 1', 'E734') + call assert_equal(80, &tw) + let &tw = _w + + let _w = &fillchars + let &fillchars = "vert:|" + call assert_fails('let &fillchars += "diff:-"', 'E734') + call assert_equal("vert:|", &fillchars) + let &fillchars = _w + endfunc + + func Test_let_errors() + let s = 'abcd' + call assert_fails('let s[1] = 5', 'E689:') + + let l = [1, 2, 3] + call assert_fails('let l[:] = 5', 'E709:') + endfunc + func Test_let_heredoc_fails() call assert_fails('let v =<< marker', 'E991:') *** ../vim-8.1.2263/src/testdir/Make_all.mak 2019-11-03 16:17:08.983705285 +0100 --- src/testdir/Make_all.mak 2019-11-06 15:18:56.037247614 +0100 *************** *** 58,64 **** test_arabic \ test_arglist \ test_assert \ - test_assign \ test_autochdir \ test_autocmd \ test_autoload \ --- 58,63 ---- *** ../vim-8.1.2263/src/testdir/test_alot.vim 2019-10-16 19:27:23.613959056 +0200 --- src/testdir/test_alot.vim 2019-11-06 15:19:09.701181529 +0100 *************** *** 1,7 **** " A series of tests that can run in one Vim invocation. " This makes testing go faster, since Vim doesn't need to restart. - source test_assign.vim source test_backup.vim source test_behave.vim source test_bufline.vim --- 1,6 ---- *** ../vim-8.1.2263/src/version.c 2019-11-06 15:06:56.836272175 +0100 --- src/version.c 2019-11-06 15:21:09.948612407 +0100 *************** *** 743,744 **** --- 743,746 ---- { /* Add new patch number below this line */ + /**/ + 2264, /**/ -- Everyone has a photographic memory. Some don't have film. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///