2016-01-22 03:57:08 -07:00
|
|
|
-- Test for CTRL-W in Insert mode
|
|
|
|
|
2024-04-20 08:44:13 -07:00
|
|
|
local n = require('test.functional.testnvim')()
|
|
|
|
|
|
|
|
local clear, feed, expect = n.clear, n.feed, n.expect
|
2016-01-22 03:57:08 -07:00
|
|
|
|
|
|
|
describe('CTRL-W in Insert mode', function()
|
|
|
|
setup(clear)
|
|
|
|
|
2017-09-24 11:42:48 -07:00
|
|
|
-- luacheck: ignore 611 (Line contains only whitespaces)
|
2016-01-22 03:57:08 -07:00
|
|
|
it('works for multi-byte characters', function()
|
|
|
|
for i = 1, 6 do
|
|
|
|
feed('o wwwこんにちわ世界ワールドvim ' .. string.rep('<C-w>', i) .. '<esc>')
|
|
|
|
end
|
|
|
|
|
|
|
|
expect([[
|
|
|
|
|
|
|
|
wwwこんにちわ世界ワールド
|
|
|
|
wwwこんにちわ世界
|
|
|
|
wwwこんにちわ
|
|
|
|
www
|
|
|
|
|
|
|
|
]])
|
|
|
|
end)
|
|
|
|
end)
|