view src/testdir/test_erasebackword.vim @ 21843:4a4678d26822 v8.2.1471

patch 8.2.1471: :const only locks the variable, not the value Commit: https://github.com/vim/vim/commit/241572794f7e93d2f8b762de2300e5f7e4f07628 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 16 22:50:01 2020 +0200 patch 8.2.1471: :const only locks the variable, not the value Problem: :const only locks the variable, not the value. Solution: Lock the value as ":lockvar 1 var" would do. (closes https://github.com/vim/vim/issues/6719)
author Bram Moolenaar <Bram@vim.org>
date Sun, 16 Aug 2020 23:00:04 +0200
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