view src/testdir/test_erasebackword.vim @ 25751:fc8046209eaa v8.2.3411

patch 8.2.3411: Vim9: crash when using base name of import Commit: https://github.com/vim/vim/commit/6853c38b78fe5333f95470e1ff3ca6741247e600 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 7 22:12:19 2021 +0200 patch 8.2.3411: Vim9: crash when using base name of import Problem: Vim9: crash when using base name of import. (Naohiro Ono) Solution: Check the import flags. (closes https://github.com/vim/vim/issues/8843)
author Bram Moolenaar <Bram@vim.org>
date Tue, 07 Sep 2021 22:15:03 +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