Mercurial > vim
comparison src/testdir/test_functions.vim @ 19554:b38d73f36467 v8.2.0334
patch 8.2.0334: abort called when using test_void()
Commit: https://github.com/vim/vim/commit/dd58923c6bcb026de7134d9874e69e0a2b01682d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 29 17:38:12 2020 +0100
patch 8.2.0334: abort called when using test_void()
Problem: Abort called when using test_void(). (Dominique Pelle)
Solution: Only give an error, don't abort.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 29 Feb 2020 17:45:04 +0100 |
parents | 9a9ca0e622c8 |
children | da98d2ed8dc5 |
comparison
equal
deleted
inserted
replaced
19553:45b9e23467da | 19554:b38d73f36467 |
---|---|
59 call assert_equal(0, empty(function('Test_empty'))) | 59 call assert_equal(0, empty(function('Test_empty'))) |
60 call assert_equal(0, empty(function('Test_empty', [0]))) | 60 call assert_equal(0, empty(function('Test_empty', [0]))) |
61 | 61 |
62 call assert_fails("call empty(test_void())", 'E685:') | 62 call assert_fails("call empty(test_void())", 'E685:') |
63 call assert_fails("call empty(test_unknown())", 'E685:') | 63 call assert_fails("call empty(test_unknown())", 'E685:') |
64 endfunc | |
65 | |
66 func Test_test_void() | |
67 call assert_fails('echo 1 == test_void()', 'E685:') | |
68 if has('float') | |
69 call assert_fails('echo 1.0 == test_void()', 'E685:') | |
70 endif | |
71 call assert_fails('let x = json_encode(test_void())', 'E685:') | |
72 call assert_fails('let x = copy(test_void())', 'E685:') | |
73 call assert_fails('let x = copy([test_void()])', 'E685:') | |
64 endfunc | 74 endfunc |
65 | 75 |
66 func Test_len() | 76 func Test_len() |
67 call assert_equal(1, len(0)) | 77 call assert_equal(1, len(0)) |
68 call assert_equal(2, len(12)) | 78 call assert_equal(2, len(12)) |