view src/testdir/test_erasebackword.vim @ 14689:796d794cdc88 v8.1.0357

patch 8.1.0357: instructions for tests are outdated commit https://github.com/vim/vim/commit/02c972153d0f36fd1ae4e7069869f51dc11c6c7d Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 9 15:56:06 2018 +0200 patch 8.1.0357: instructions for tests are outdated Problem: Instructions for tests are outdated. (Jason Franklin) Solution: Update the text.
author Christian Brabandt <cb@256bit.org>
date Sun, 09 Sep 2018 16:00:08 +0200
parents 90aaa974594e
children 2dcaa860e3fc
line wrap: on
line source


func Test_erasebackword()
  if !has('multi_byte')
    return
  endif

  set encoding=utf-8
  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!
  set encoding&
endfunc