diff options
author | James McCoy <jamessan@jamessan.com> | 2018-03-28 21:52:06 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2018-03-28 21:54:39 -0400 |
commit | 79f9c2d9c650ceab27cdc6707fd6d7fa1de29fc1 (patch) | |
tree | 4e0589d75801f3ff6a9678f84f5009102766661e /test/functional/ex_cmds/quickfix_commands_spec.lua | |
parent | 4403864da3c48412595d439f36458d1e6ccfc49f (diff) | |
parent | 3f3de9b1a95d273463a87516365510dbffcaf3d2 (diff) | |
download | rneovim-79f9c2d9c650ceab27cdc6707fd6d7fa1de29fc1.tar.gz rneovim-79f9c2d9c650ceab27cdc6707fd6d7fa1de29fc1.tar.bz2 rneovim-79f9c2d9c650ceab27cdc6707fd6d7fa1de29fc1.zip |
Merge branch 'master' into yagebu/option-fixes
Diffstat (limited to 'test/functional/ex_cmds/quickfix_commands_spec.lua')
-rw-r--r-- | test/functional/ex_cmds/quickfix_commands_spec.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/functional/ex_cmds/quickfix_commands_spec.lua b/test/functional/ex_cmds/quickfix_commands_spec.lua index 5ab34db3fb..bf10f80401 100644 --- a/test/functional/ex_cmds/quickfix_commands_spec.lua +++ b/test/functional/ex_cmds/quickfix_commands_spec.lua @@ -7,6 +7,7 @@ local command = helpers.command local exc_exec = helpers.exc_exec local write_file = helpers.write_file local curbufmeths = helpers.curbufmeths +local source = helpers.source local file_base = 'Xtest-functional-ex_cmds-quickfix_commands' @@ -81,3 +82,30 @@ for _, c in ipairs({'l', 'c'}) do end) end) end + +describe('quickfix', function() + it('location-list update on buffer modification', function() + source([[ + new + setl bt=nofile + let lines = ['Line 1', 'Line 2', 'Line 3', 'Line 4', 'Line 5'] + call append(0, lines) + new + setl bt=nofile + call append(0, lines) + let qf_item = { + \ 'lnum': 4, + \ 'text': "This is the error line.", + \ } + let qf_item['bufnr'] = bufnr('%') + call setloclist(0, [qf_item]) + wincmd p + let qf_item['bufnr'] = bufnr('%') + call setloclist(0, [qf_item]) + 1del _ + call append(0, ['New line 1', 'New line 2', 'New line 3']) + silent ll + ]]) + eq({0, 6, 1, 0, 1}, funcs.getcurpos()) + end) +end) |