2016-01-22 03:57:08 -07:00
|
|
|
-- Test for CTRL-W in Insert mode
|
|
|
|
|
2024-04-09 04:26:16 -07:00
|
|
|
local t = require('test.functional.testutil')()
|
2024-04-08 02:03:20 -07:00
|
|
|
local clear, feed, expect = t.clear, t.feed, t.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)
|