comparison src/testdir/test_method.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 9f98957582d6
children 906269bf83d5
comparison
equal deleted inserted replaced
19723:16aa117306ec 19724:b3e93a05c3ca
33 call assert_equal([1, 2, 3, 4], [4, 2, 3, 1]->sort()) 33 call assert_equal([1, 2, 3, 4], [4, 2, 3, 1]->sort())
34 call assert_equal('[1, 2, 3]', l->string()) 34 call assert_equal('[1, 2, 3]', l->string())
35 call assert_equal(v:t_list, l->type()) 35 call assert_equal(v:t_list, l->type())
36 call assert_equal([1, 2, 3], [1, 1, 2, 3, 3]->uniq()) 36 call assert_equal([1, 2, 3], [1, 1, 2, 3, 3]->uniq())
37 call assert_fails('eval l->values()', 'E715:') 37 call assert_fails('eval l->values()', 'E715:')
38 call assert_fails('echo []->len', 'E107:')
38 endfunc 39 endfunc
39 40
40 func Test_dict_method() 41 func Test_dict_method()
41 let d = #{one: 1, two: 2, three: 3} 42 let d = #{one: 1, two: 2, three: 3}
42 43
150 endfunc 151 endfunc
151 152
152 func Test_method_not_supported() 153 func Test_method_not_supported()
153 call assert_fails('eval 123->changenr()', 'E276:') 154 call assert_fails('eval 123->changenr()', 'E276:')
154 endfunc 155 endfunc
156
157 " vim: shiftwidth=2 sts=2 expandtab