view src/testdir/test_erasebackword.vim @ 27897:2a2c0958a913 v8.2.4474

patch 8.2.4474: memory allocation failures not tested in quickfix code Commit: https://github.com/vim/vim/commit/5a2d4a3ecb67942d47615507a163ffcd5863c073 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Feb 26 10:31:32 2022 +0000 patch 8.2.4474: memory allocation failures not tested in quickfix code Problem: Memory allocation failures not tested in quickfix code. Solution: Add alloc IDs and tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/9848)
author Bram Moolenaar <Bram@vim.org>
date Sat, 26 Feb 2022 11:45:03 +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