aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-27 13:08:01 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-10-27 13:10:33 +0800
commit762ca67091d13336f90350a15e0a1b965d6d5c01 (patch)
tree4efcd2a9392b1cdfc3484eb712307c227c6d4667 /src/nvim/testdir
parent25cf4f2fc712530a65dc3b533508c36d0439b728 (diff)
downloadrneovim-762ca67091d13336f90350a15e0a1b965d6d5c01.tar.gz
rneovim-762ca67091d13336f90350a15e0a1b965d6d5c01.tar.bz2
rneovim-762ca67091d13336f90350a15e0a1b965d6d5c01.zip
vim-patch:8.2.4234: test_garbagecollect_now() does not check v:testing
Problem: test_garbagecollect_now() does not check v:testing as documented. Solution: Give an error if v:testing is not set. https://github.com/vim/vim/commit/b3d83980d2ac0f7a25314270416f17af874ca269 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_functions.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index b751215b79..fa79aaf6d7 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -2206,6 +2206,12 @@ func Test_range()
call assert_equal([0, 1, 2, 3, 4], uniq(range(5)))
endfunc
+func Test_garbagecollect_now_fails()
+ let v:testing = 0
+ call assert_fails('call test_garbagecollect_now()', 'E1142:')
+ let v:testing = 1
+endfunc
+
" Test for the eval() function
func Test_eval()
call assert_fails("call eval('5 a')", 'E488:')