signs_spec.lua 690 B

123456789101112131415161718192021222324
  1. -- Tests for signs
  2. local helpers = require('test.functional.helpers')(after_each)
  3. local clear, command, expect = helpers.clear, helpers.command, helpers.expect
  4. describe('signs', function()
  5. setup(clear)
  6. it('is working', function()
  7. command('sign define JumpSign text=x')
  8. command([[exe 'sign place 42 line=2 name=JumpSign buffer=' . bufnr('')]])
  9. -- Split the window to the bottom to verify :sign-jump will stay in the current
  10. -- window if the buffer is displayed there.
  11. command('bot split')
  12. command([[exe 'sign jump 42 buffer=' . bufnr('')]])
  13. command([[call append(line('$'), winnr())]])
  14. -- Assert buffer contents.
  15. expect([[
  16. 2]])
  17. end)
  18. end)