view src/testdir/test_blockedit.vim @ 22995:94656f3ff304 v8.2.2044

patch 8.2.2044: MS-Windows: swap file test sometimes fails Commit: https://github.com/vim/vim/commit/5ee0981fb5259f94900ab25207caddf1fa61010d Author: Bram Moolenaar <Bram@vim.org> Date: Wed Nov 25 12:43:28 2020 +0100 patch 8.2.2044: MS-Windows: swap file test sometimes fails Problem: MS-Windows: swap file test sometimes fails. Solution: Use a more reliable way to change the process ID. When "timeout" fails use "ping" to wait up to ten minutes. (Ken Takata, closes #7365)
author Bram Moolenaar <Bram@vim.org>
date Wed, 25 Nov 2020 12:45:03 +0100
parents 08940efa6b4e
children bd46322bea66
line wrap: on
line source

" Test for block inserting

func Test_blockinsert_indent()
  new
  filetype plugin indent on
  setlocal sw=2 et ft=vim
  call setline(1, ['let a=[', '  ''eins'',', '  ''zwei'',', '  ''drei'']'])
  call cursor(2, 3)
  exe "norm! \<c-v>2jI\\ \<esc>"
  call assert_equal(['let a=[', '      \ ''eins'',', '      \ ''zwei'',', '      \ ''drei'']'],
        \ getline(1,'$'))
  " reset to sane state
  filetype off
  bwipe!
endfunc

func Test_blockinsert_delete()
  new
  let _bs = &bs
  set bs=2
  call setline(1, ['case Arg is ', '        when Name_Async,', '        when Name_Num_Gangs,', 'end if;'])
  exe "norm! ggjVj\<c-v>$o$A\<bs>\<esc>"
  "call feedkeys("Vj\<c-v>$o$A\<bs>\<esc>", 'ti')
  call assert_equal(["case Arg is ", "        when Name_Async", "        when Name_Num_Gangs,", "end if;"],
        \ getline(1,'$'))
  " reset to sane state
  let &bs = _bs
  bwipe!
endfunc

" vim: shiftwidth=2 sts=2 expandtab