diff options
| author | James McCoy <jamessan@jamessan.com> | 2016-06-09 21:56:49 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-09 21:56:49 -0400 |
| commit | b3f6b3075188860454e6000c765f8483c5ca782a (patch) | |
| tree | e0bc267f245eb7e7a069e75d4521344d75eea007 /src/nvim/testdir | |
| parent | 56e9e81115f9c551c5820cb49284602224e0e84e (diff) | |
| parent | 1e6fa9338e58a3ed9f014ffea4ed52df78f1258b (diff) | |
| download | rneovim-b3f6b3075188860454e6000c765f8483c5ca782a.tar.gz rneovim-b3f6b3075188860454e6000c765f8483c5ca782a.tar.bz2 rneovim-b3f6b3075188860454e6000c765f8483c5ca782a.zip | |
Merge pull request #4788 from brcolow/vim-7.4.1051
vim-patch:7.4.{1051,1068}
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/Makefile | 1 | ||||
| -rw-r--r-- | src/nvim/testdir/test_unlet.vim | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 4b2b150ef2..4c4b46e159 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -39,6 +39,7 @@ NEW_TESTS = \ test_menu.res \ test_syntax.res \ test_timers.res \ + test_unlet.res \ test_viml.res \ test_alot.res diff --git a/src/nvim/testdir/test_unlet.vim b/src/nvim/testdir/test_unlet.vim new file mode 100644 index 0000000000..f6705997a9 --- /dev/null +++ b/src/nvim/testdir/test_unlet.vim @@ -0,0 +1,26 @@ +" Tests for :unlet + +func Test_read_only() + try + " this caused a crash + unlet count + catch + call assert_true(v:exception =~ ':E795:') + endtry +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 + try + unlet does_not_exist + catch + call assert_true(v:exception =~ ':E108:') + endtry +endfunc |