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.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/functional/legacy/quickfix_spec.lua b/test/functional/legacy/quickfix_spec.lua
index 315b8ca682..ca98765336 100644
--- a/test/functional/legacy/quickfix_spec.lua
+++ b/test/functional/legacy/quickfix_spec.lua
@@ -1,8 +1,10 @@
-- Test for the quickfix commands.
-local helpers = require('test.functional.helpers')
+local helpers = require('test.functional.helpers')(after_each)
local source, clear = helpers.source, helpers.clear
local eq, nvim, call = helpers.eq, helpers.meths, helpers.call
+local eval = helpers.eval
+local execute = helpers.execute
local function expected_empty()
eq({}, nvim.get_vvar('errors'))
@@ -306,4 +308,11 @@ describe('helpgrep', function()
call('XbufferTests', 'l')
expected_empty()
end)
+
+ it('autocommands triggered by quickfix can get title', function()
+ execute('au FileType qf let g:foo = get(w:, "quickfix_title", "NONE")')
+ execute('call setqflist([])')
+ execute('copen')
+ eq(':setqflist()', eval('g:foo'))
+ end)
end)