view src/testdir/test_unlet.vim @ 12899:9e04de2aa738 v8.0.1326

patch 8.0.1326: largefile test fails on CI, glob test on MS-Windows commit https://github.com/vim/vim/commit/6e77df2d8555ade4470e566011603ae40f1f0f3a Author: Bram Moolenaar <Bram@vim.org> Date: Tue Nov 21 11:43:08 2017 +0100 patch 8.0.1326: largefile test fails on CI, glob test on MS-Windows Problem: Largefile test fails on CI, glob test on MS-Windows. Solution: Remove largefile test from list of all tests. Don't run Test_glob() on non-unix systems. More cleanup. (Yegappan Lakshmanan, closes #2354)
author Christian Brabandt <cb@256bit.org>
date Tue, 21 Nov 2017 11:45:06 +0100
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