From 0fb08f353948016c8ad6e4a13a9a128208f4dcc5 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 26 Oct 2022 13:38:51 +0800 Subject: vim-patch:7.4.1081 Problem: No test for what previously caused a crash. Solution: Add test for unletting errmsg. https://github.com/vim/vim/commit/254b105b755d9736ece5f7f28db92acaf3e7bf76 Use v:errmsg instead of errmsg. Co-authored-by: Bram Moolenaar --- src/nvim/testdir/test_unlet.vim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/nvim/testdir/test_unlet.vim b/src/nvim/testdir/test_unlet.vim index b02bdaab3b..db064b5e9b 100644 --- a/src/nvim/testdir/test_unlet.vim +++ b/src/nvim/testdir/test_unlet.vim @@ -7,6 +7,12 @@ func Test_read_only() catch call assert_true(v:exception =~ ':E795:') endtry + try + " this caused a crash + unlet v:errmsg + catch + call assert_true(v:exception =~ ':E795:') + endtry endfunc func Test_existing() -- cgit