view src/testdir/test_erasebackword.vim @ 22298:07e48ee8c3bb v8.2.1698

patch 8.2.1698: cannot lock a variable in legacy Vim script like in Vim9 Commit: https://github.com/vim/vim/commit/a187c43cfe8863d48b2159d695fedcb71f8525c1 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 16 21:08:28 2020 +0200 patch 8.2.1698: cannot lock a variable in legacy Vim script like in Vim9 Problem: Cannot lock a variable in legacy Vim script like in Vim9. Solution: Make ":lockvar 0" work.
author Bram Moolenaar <Bram@vim.org>
date Wed, 16 Sep 2020 21:15:05 +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