aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/quickfix_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/legacy/quickfix_spec.lua')
-rw-r--r--test/functional/legacy/quickfix_spec.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/legacy/quickfix_spec.lua b/test/functional/legacy/quickfix_spec.lua
index 480e046f55..fa9ddc78ae 100644
--- a/test/functional/legacy/quickfix_spec.lua
+++ b/test/functional/legacy/quickfix_spec.lua
@@ -443,6 +443,17 @@ describe('helpgrep', function()
augroup! testgroup
endfunc
+
+ func Test_caddbuffer_to_empty()
+ helpgr quickfix
+ call setqflist([], 'r')
+ cad
+ call assert_fails('cn', 'E553:')
+ " Upstream calls quit! here to verify vim is still
+ " running, but that will be covered by the
+ " expected_empty() call in the busted test
+ " quit!
+ endfunc
]])
end)
@@ -522,6 +533,11 @@ describe('helpgrep', function()
call('XquickfixChangedByAutocmd', 'l')
expected_empty()
end)
+
+ it('does not crash after using caddbuffer with an empty qf list', function()
+ call('Test_caddbuffer_to_empty')
+ expected_empty()
+ end)
end)
describe('errorformat', function()