2016-05-14 14:11:17 -07:00
|
|
|
-- Test for joining lines
|
|
|
|
|
2016-04-23 16:53:11 -07:00
|
|
|
local helpers = require('test.functional.helpers')(after_each)
|
2016-05-14 14:11:17 -07:00
|
|
|
local clear, eq = helpers.clear, helpers.eq
|
2017-04-08 14:12:26 -07:00
|
|
|
local eval, command = helpers.eval, helpers.command
|
2016-05-14 14:11:17 -07:00
|
|
|
|
|
|
|
describe('joining lines', function()
|
|
|
|
before_each(clear)
|
|
|
|
|
|
|
|
it('is working', function()
|
2017-04-08 14:12:26 -07:00
|
|
|
command('new')
|
|
|
|
command([[call setline(1, ['one', 'two', 'three', 'four'])]])
|
|
|
|
command('normal J')
|
2016-05-14 14:11:17 -07:00
|
|
|
eq('one two', eval('getline(1)'))
|
2017-04-08 14:12:26 -07:00
|
|
|
command('%del')
|
|
|
|
command([[call setline(1, ['one', 'two', 'three', 'four'])]])
|
|
|
|
command('normal 10J')
|
2016-05-14 14:11:17 -07:00
|
|
|
eq('one two three four', eval('getline(1)'))
|
|
|
|
end)
|
|
|
|
end)
|