view src/testdir/test_python2.vim @ 13215:ae5f855a64be v8.0.1482

patch 8.0.1482: using feedkeys() does not work to test completion commit https://github.com/vim/vim/commit/02ae9b4a93deea4993d7abe20485f91f1cce5e36 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 9 15:06:02 2018 +0100 patch 8.0.1482: using feedkeys() does not work to test completion Problem: Using feedkeys() does not work to test Insert mode completion. (Lifepillar) Solution: Do not check for typed keys when executing :normal or feedkeys(). Fix thesaurus completion not working when 'complete' is empty.
author Christian Brabandt <cb@256bit.org>
date Fri, 09 Feb 2018 15:15:06 +0100
parents 27b42717662b
children c15bef307de6
line wrap: on
line source

" Test for python 2 commands.
" TODO: move tests from test87.in here.

if !has('python')
  finish
endif

func Test_pydo()
  " Check deleting lines does not trigger ml_get error.
  py import vim
  new
  call setline(1, ['one', 'two', 'three'])
  pydo vim.command("%d_")
  bwipe!

  " Check switching to another buffer does not trigger ml_get error.
  new
  let wincount = winnr('$')
  call setline(1, ['one', 'two', 'three'])
  pydo vim.command("new")
  call assert_equal(wincount + 1, winnr('$'))
  bwipe!
  bwipe!
endfunc