view src/testdir/test_erasebackword.vim @ 31948:c8cfdbe7b7f2 v9.0.1306

patch 9.0.1306: no regression test for solved problem of #11959 Commit: https://github.com/vim/vim/commit/5ceb8157bc4608eeff4b7453da31ebe65f08a862 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 12 18:11:21 2023 +0000 patch 9.0.1306: no regression test for solved problem of https://github.com/vim/vim/issues/11959 Problem: No regression test for solved problem of https://github.com/vim/vim/issues/11959. Solution: Add a test, also with 'list' set. (closes https://github.com/vim/vim/issues/11959)
author Bram Moolenaar <Bram@vim.org>
date Sun, 12 Feb 2023 19:15:05 +0100
parents 08940efa6b4e
children
line wrap: on
line source

" Test for i_CTRL-W

func Test_erasebackword()
  enew

  exe "normal o wwwこんにちわ世界ワールドvim \<C-W>"
  call assert_equal(' wwwこんにちわ世界ワールド', getline('.'))
  exe "normal o wwwこんにちわ世界ワールドvim \<C-W>\<C-W>"
  call assert_equal(' wwwこんにちわ世界', getline('.'))
  exe "normal o wwwこんにちわ世界ワールドvim \<C-W>\<C-W>\<C-W>"
  call assert_equal(' wwwこんにちわ', getline('.'))
  exe "normal o wwwこんにちわ世界ワールドvim \<C-W>\<C-W>\<C-W>\<C-W>"
  call assert_equal(' www', getline('.'))
  exe "normal o wwwこんにちわ世界ワールドvim \<C-W>\<C-W>\<C-W>\<C-W>\<C-W>"
  call assert_equal(' ', getline('.'))
  exe "normal o wwwこんにちわ世界ワールドvim \<C-W>\<C-W>\<C-W>\<C-W>\<C-W>\<C-W>"
  call assert_equal('', getline('.'))

  enew!
endfunc

" vim: shiftwidth=2 sts=2 expandtab