Mercurial > vim
diff src/testdir/test_let.vim @ 19724:b3e93a05c3ca v8.2.0418
patch 8.2.0418: code in eval.c not sufficiently covered by tests
Commit: https://github.com/vim/vim/commit/8b633135106dda8605463b780573c45b00c22afe
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Mar 20 18:20:51 2020 +0100
patch 8.2.0418: code in eval.c not sufficiently covered by tests
Problem: Code in eval.c not sufficiently covered by tests.
Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5815)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 20 Mar 2020 18:30:05 +0100 |
parents | da98d2ed8dc5 |
children | 0b35a7ffceb2 |
line wrap: on
line diff
--- a/src/testdir/test_let.vim +++ b/src/testdir/test_let.vim @@ -275,6 +275,17 @@ func Test_let_errors() let s = "var" let var = 1 call assert_fails('let {s}.1 = 2', 'E18:') + call assert_fails('let a[1] = 5', 'E121:') + let l = [[1,2]] + call assert_fails('let l[:][0] = [5]', 'E708:') + let d = {'k' : 4} + call assert_fails('let d.# = 5', 'E713:') + call assert_fails('let d.m += 5', 'E734:') + let l = [1, 2] + call assert_fails('let l[2] = 0', 'E684:') + call assert_fails('let l[0:1] = [1, 2, 3]', 'E710:') + call assert_fails('let l[-2:-3] = [3, 4]', 'E684:') + call assert_fails('let l[0:4] = [5, 6]', 'E711:') " This test works only when the language is English if v:lang == "C" || v:lang =~ '^[Ee]n'