view src/testdir/test_erasebackword.vim @ 22794:42bb78d46354 v8.2.1945

patch 8.2.1945: crash when passing NULL function to reduce() Commit: https://github.com/vim/vim/commit/0d90e728fe089ff1bb34d6a17f5591a96b57f734 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Nov 3 18:20:19 2020 +0100 patch 8.2.1945: crash when passing NULL function to reduce() Problem: Crash when passing NULL function to reduce(). Solution: Check for NULL pointer and give an error. (Dominique Pell?, closes #7243)
author Bram Moolenaar <Bram@vim.org>
date Tue, 03 Nov 2020 18:30:04 +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