aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorlonerover <pathfinder1644@yahoo.com>2016-12-27 11:59:59 +0800
committerJames McCoy <jamessan@jamessan.com>2017-01-03 10:38:56 -0500
commit1bea73a21e09990c7475b674bfc909eddf5ec698 (patch)
tree5ae30abd51476797a555706fed7b5590ae0b8021 /src/nvim/testdir
parentfd9cc8b0b2157d0b0b1c1ceb3105fc7b7722949d (diff)
downloadrneovim-1bea73a21e09990c7475b674bfc909eddf5ec698.tar.gz
rneovim-1bea73a21e09990c7475b674bfc909eddf5ec698.tar.bz2
rneovim-1bea73a21e09990c7475b674bfc909eddf5ec698.zip
vim-patch:7.4.1847
Problem: Getting an item from a NULL dict crashes. Setting a register to a NULL list crashes. (Nikolai Pavlov, issue vim/vim#768) Comparing a NULL dict with a NULL dict fails. Solution: Properly check for NULL. https://github.com/vim/vim/commit/13ddc5c35921efa69e980284117b6db6465e019c
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_expr.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim
index 571a37c62c..7483973fca 100644
--- a/src/nvim/testdir/test_expr.vim
+++ b/src/nvim/testdir/test_expr.vim
@@ -81,3 +81,14 @@ func Test_loop_over_null_list()
call assert_true(0, 'should not get here')
endfor
endfunc
+
+func Test_compare_null_dict()
+ call assert_fails('let x = v:_null_dict[10]')
+ call assert_equal({}, {})
+ call assert_equal(v:_null_dict, v:_null_dict)
+ call assert_notequal({}, v:_null_dict)
+endfunc
+
+func Test_set_reg_null_list()
+ call setreg('x', v:_null_list)
+endfunc