From d20bbc802245cc14176028bf209ae3a7e81e21c4 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 20 Jul 2019 13:06:17 -0400 Subject: vim-patch:8.1.0789: session sets v:errmsg #10553 Problem: Sourcing a session sets v:errmsg. Solution: Use "%argdel" instead of "argdel *". (Jason Franklin) https://github.com/vim/vim/commit/555de4e3b2881b0d9a72242ecc2ba26b5c698c85 --- src/nvim/testdir/test_mksession.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_mksession.vim b/src/nvim/testdir/test_mksession.vim index 7c5b95ae96..d77dac69c7 100644 --- a/src/nvim/testdir/test_mksession.vim +++ b/src/nvim/testdir/test_mksession.vim @@ -238,6 +238,17 @@ func Test_mkview_no_file_name() %bwipe endfunc +" A clean session (one empty buffer, one window, and one tab) should not +" set any error messages when sourced because no commands should fail. +func Test_mksession_no_errmsg() + let v:errmsg = '' + %bwipe! + mksession! Xtest_mks.out + source Xtest_mks.out + call assert_equal('', v:errmsg) + call delete('Xtest_mks.out') +endfunc + func Test_mksession_quote_in_filename() if !has('unix') " only Unix can handle this weird filename -- cgit