join_spec.lua 596 B

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