From 27fd17a79cd2c51e71077bdd896635188ad711b5 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 8 Jul 2022 17:43:05 +0800 Subject: vim-patch:8.2.0243: insufficient code coverage for ex_docmd.c functions Problem: Insufficient code coverage for ex_docmd.c functions. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5618) https://github.com/vim/vim/commit/9f6277bdde97b7767ded43a0b5a2023eb601b3b7 Cherry-pick Test_window_only() from patch 8.2.0203. Cherry-pick a memory leak fix from patch 8.2.0399. --- test/functional/legacy/arglist_spec.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/functional/legacy/arglist_spec.lua b/test/functional/legacy/arglist_spec.lua index fbb67f9c03..46a016ab1c 100644 --- a/test/functional/legacy/arglist_spec.lua +++ b/test/functional/legacy/arglist_spec.lua @@ -3,6 +3,7 @@ local helpers = require('test.functional.helpers')(after_each) local clear, command, eq = helpers.clear, helpers.command, helpers.eq local eval, exc_exec, neq = helpers.eval, helpers.exc_exec, helpers.neq +local pcall_err = helpers.pcall_err describe('argument list commands', function() before_each(clear) @@ -206,7 +207,6 @@ describe('argument list commands', function() command('%argd') end) - it('test for autocommand that redefines the argument list, when doing ":all"', function() command('autocmd BufReadPost Xxx2 next Xxx2 Xxx1') command("call writefile(['test file Xxx1'], 'Xxx1')") @@ -234,4 +234,9 @@ describe('argument list commands', function() command('argdelete Xxx*') command('bwipe! Xxx1 Xxx2 Xxx3') end) + + it('quitting Vim with unedited files in the argument list throws E173', function() + command('args a b c') + eq('Vim(quit):E173: 2 more files to edit', pcall_err(command, 'quit')) + end) end) -- cgit