join_spec.lua 593 B

1234567891011121314151617181920212223
  1. -- Test for joining lines
  2. local t = require('test.testutil')
  3. local n = require('test.functional.testnvim')()
  4. local clear, eq = n.clear, t.eq
  5. local eval, command = n.eval, n.command
  6. describe('joining lines', function()
  7. before_each(clear)
  8. it('is working', function()
  9. command('new')
  10. command([[call setline(1, ['one', 'two', 'three', 'four'])]])
  11. command('normal J')
  12. eq('one two', eval('getline(1)'))
  13. command('%del')
  14. command([[call setline(1, ['one', 'two', 'three', 'four'])]])
  15. command('normal 10J')
  16. eq('one two three four', eval('getline(1)'))
  17. end)
  18. end)