view src/testdir/test_python3.vim @ 11412:84baca75b7f2 v8.0.0590

patch 8.0.0590: cannot add a context to locations commit https://github.com/vim/vim/commit/8f77c5a4ec756f3f866bd6b18feb6fca6f2a2e91 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 30 14:21:00 2017 +0200 patch 8.0.0590: cannot add a context to locations Problem: Cannot add a context to locations. Solution: Add the "context" entry in location entries. (Yegappan Lakshmanan, closes #1012)
author Christian Brabandt <cb@256bit.org>
date Sun, 30 Apr 2017 14:30:04 +0200
parents 27b42717662b
children c15bef307de6
line wrap: on
line source

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

if !has('python3')
  finish
endif

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

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