comparison src/testdir/test_functions.vim @ 24940:0c415a0f54f9 v8.2.3007

patch 8.2.3007: Vim9: test for void value fails Commit: https://github.com/vim/vim/commit/61a417b7c1fe858d778c7c47f33f7b4dac19360d Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 15 22:54:28 2021 +0200 patch 8.2.3007: Vim9: test for void value fails Problem: Vim9: test for void value fails. Solution: Adjust expected error. Do not make a copy of void.
author Bram Moolenaar <Bram@vim.org>
date Tue, 15 Jun 2021 23:15:02 +0200
parents f67773e26cfa
children 82ae6fcd86c8
comparison
equal deleted inserted replaced
24939:257de87388c3 24940:0c415a0f54f9
84 call assert_fails("call empty(test_void())", 'E685:') 84 call assert_fails("call empty(test_void())", 'E685:')
85 call assert_fails("call empty(test_unknown())", 'E685:') 85 call assert_fails("call empty(test_unknown())", 'E685:')
86 endfunc 86 endfunc
87 87
88 func Test_test_void() 88 func Test_test_void()
89 call assert_fails('echo 1 == test_void()', 'E685:') 89 call assert_fails('echo 1 == test_void()', 'E1031:')
90 if has('float') 90 if has('float')
91 call assert_fails('echo 1.0 == test_void()', 'E685:') 91 call assert_fails('echo 1.0 == test_void()', 'E1031:')
92 endif 92 endif
93 call assert_fails('let x = json_encode(test_void())', 'E685:') 93 call assert_fails('let x = json_encode(test_void())', 'E685:')
94 call assert_fails('let x = copy(test_void())', 'E685:') 94 call assert_fails('let x = copy(test_void())', 'E685:')
95 call assert_fails('let x = copy([test_void()])', 'E685:') 95 call assert_fails('let x = copy([test_void()])', 'E1031:')
96 endfunc 96 endfunc
97 97
98 func Test_len() 98 func Test_len()
99 call assert_equal(1, len(0)) 99 call assert_equal(1, len(0))
100 call assert_equal(2, len(12)) 100 call assert_equal(2, len(12))