diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-10-28 23:14:15 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-10-28 23:14:15 -0400 |
commit | 72c54db443aad66dd5f71ce25d7ec8896715e233 (patch) | |
tree | bb13b201a2934a8a5a3bb60f3f1025fbf2707ac9 /test/functional/ex_cmds/sign_spec.lua | |
parent | c28adf15e6c2079c732bb77fb99c50b80a4d7fe2 (diff) | |
parent | 250298884bb0c86847131cb872dcc9865115f8eb (diff) | |
download | rneovim-72c54db443aad66dd5f71ce25d7ec8896715e233.tar.gz rneovim-72c54db443aad66dd5f71ce25d7ec8896715e233.tar.bz2 rneovim-72c54db443aad66dd5f71ce25d7ec8896715e233.zip |
Merge #1342 "signs bugfix"
Diffstat (limited to 'test/functional/ex_cmds/sign_spec.lua')
-rw-r--r-- | test/functional/ex_cmds/sign_spec.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/functional/ex_cmds/sign_spec.lua b/test/functional/ex_cmds/sign_spec.lua new file mode 100644 index 0000000000..74e1aa4702 --- /dev/null +++ b/test/functional/ex_cmds/sign_spec.lua @@ -0,0 +1,25 @@ +local helpers = require('test.functional.helpers') +local clear, nvim, buffer, curbuf, curwin, eq, ok = + helpers.clear, helpers.nvim, helpers.buffer, helpers.curbuf, helpers.curwin, + helpers.eq, helpers.ok + +describe('sign', function() + describe('unplace {id}', function() + describe('without specifying buffer', function() + it('deletes the sign from all buffers', function() + -- place a sign with id 34 to first buffer + nvim('command', 'sign define Foo text=+ texthl=Delimiter linehl=Comment') + local buf1 = nvim('eval', 'bufnr("%")') + nvim('command', 'sign place 34 line=3 name=Foo buffer='..buf1) + -- create a second buffer and place the sign on it as well + nvim('command', 'new') + local buf2 = nvim('eval', 'bufnr("%")') + nvim('command', 'sign place 34 line=3 name=Foo buffer='..buf2) + -- now unplace without specifying a buffer + nvim('command', 'sign unplace 34') + eq("\n--- Signs ---\n", nvim('command_output', 'sign place buffer='..buf1)) + eq("\n--- Signs ---\n", nvim('command_output', 'sign place buffer='..buf2)) + end) + end) + end) +end) |