view src/testdir/test_unlet.vim @ 13628:b59806681b98 v8.0.1686

patch 8.0.1686: Python does not work when configuring with specific dir commit https://github.com/vim/vim/commit/d088240b96bc8b2bdba9242dcb9e3d36f1e16c48 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 10 18:13:05 2018 +0200 patch 8.0.1686: Python does not work when configuring with specific dir Problem: Python does not work when configuring with specific dir. (Rajdeep) Solution: Do define PYTHON_HOME and PYTHON3_HOME in configure if the Python config dir was specified.
author Christian Brabandt <cb@256bit.org>
date Tue, 10 Apr 2018 18:15:07 +0200
parents 8bff367672a4
children e4d5726e1678
line wrap: on
line source

" Tests for :unlet

func Test_read_only()
  " these caused a crash
  call assert_fails('unlet count', 'E795:')
  call assert_fails('unlet errmsg', 'E795:')
endfunc

func Test_existing()
  let does_exist = 1
  call assert_true(exists('does_exist'))
  unlet does_exist
  call assert_false(exists('does_exist'))
endfunc

func Test_not_existing()
  unlet! does_not_exist
  call assert_fails('unlet does_not_exist', 'E108:')
endfunc

func Test_unlet_fails()
  call assert_fails('unlet v:["count"]', 'E46:')
endfunc