aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorShougo <Shougo.Matsu@gmail.com>2017-01-15 10:38:57 +0900
committerJustin M. Keyes <justinkz@gmail.com>2017-01-15 02:38:57 +0100
commita6be6df5d6212ab9588afebde127ae4406e478d7 (patch)
tree55c4730c8ac60c801b76b0d83e2471ed197fcd30 /src/nvim/testdir
parentc88e4a270d54eae3fe8e6b93a0ed3898e4632be5 (diff)
downloadrneovim-a6be6df5d6212ab9588afebde127ae4406e478d7.tar.gz
rneovim-a6be6df5d6212ab9588afebde127ae4406e478d7.tar.bz2
rneovim-a6be6df5d6212ab9588afebde127ae4406e478d7.zip
vim-patch:7.4.2160 (#5952)
Problem: setmatches() mixes up values. (Nikolai Pavlov) Solution: Save the string instead of reusing a shared buffer. https://github.com/vim/vim/commit/7dc5e2e486fe0287601968e535902a41a39f65bb
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_expr.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim
index 189ecce2fe..217cf6fb96 100644
--- a/src/nvim/testdir/test_expr.vim
+++ b/src/nvim/testdir/test_expr.vim
@@ -96,4 +96,12 @@ endfunc
func Test_special_char()
" The failure is only visible using valgrind.
call assert_fails('echo "\<C-">')
+
+func Test_setmatches()
+ hi def link 1 Comment
+ hi def link 2 PreProc
+ let set = [{"group": 1, "pattern": 2, "id": 3, "priority": 4, "conceal": 5}]
+ let exp = [{"group": '1', "pattern": '2', "id": 3, "priority": 4, "conceal": '5'}]
+ call setmatches(set)
+ call assert_equal(exp, getmatches())
endfunc