aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorlonerover <pathfinder1644@yahoo.com>2016-12-27 11:15:44 +0800
committerJustin M. Keyes <justinkz@gmail.com>2016-12-26 22:15:44 -0500
commita6b14dbb0be0145c2c347de65738042f27325519 (patch)
tree76be5aadd7f2a723e9f99624062aa7ed04bcc719 /src/nvim/testdir
parent4431975210b58c6b0403ee50172bad3c8729bbb2 (diff)
downloadrneovim-a6b14dbb0be0145c2c347de65738042f27325519.tar.gz
rneovim-a6b14dbb0be0145c2c347de65738042f27325519.tar.bz2
rneovim-a6b14dbb0be0145c2c347de65738042f27325519.zip
vim-patch:7.4.1816 (#5833)
Problem: Looping over a null list throws an error. Solution: Skip over the for loop. https://github.com/vim/vim/commit/d8585eded6359f1d7e1981e96ae775efd077c638
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_expr.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim
index cc5e9587ed..571a37c62c 100644
--- a/src/nvim/testdir/test_expr.vim
+++ b/src/nvim/testdir/test_expr.vim
@@ -74,3 +74,10 @@ func Test_dict()
call assert_equal('none', d[''])
call assert_equal('aaa', d['a'])
endfunc
+
+func Test_loop_over_null_list()
+ let null_list = submatch(1, 1)
+ for i in null_list
+ call assert_true(0, 'should not get here')
+ endfor
+endfunc