2014-10-27 13:29:44 -07:00
|
|
|
local helpers = require('test.functional.helpers')
|
2015-11-17 15:31:22 -07:00
|
|
|
local clear, nvim, eq = helpers.clear, helpers.nvim, helpers.eq
|
2014-10-27 13:29:44 -07:00
|
|
|
|
|
|
|
describe('sign', function()
|
2015-03-28 08:03:13 -07:00
|
|
|
before_each(clear)
|
2014-10-27 13:29:44 -07:00
|
|
|
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)
|