aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_expr.vim
diff options
context:
space:
mode:
authorckelsel <ckelsel@hotmail.com>2017-07-30 09:10:22 +0800
committerckelsel <ckelsel@hotmail.com>2017-07-30 09:10:22 +0800
commit7c7039767aa4d715aea997721b0d759b308a43d4 (patch)
treeec7c704982a8fabb676700b218f066eb6c84cc0e /src/nvim/testdir/test_expr.vim
parent973bc2b7e0ef1ca33764410ba0a22fc57bd42366 (diff)
parent743993eb553302a461ee0ef9cffa57f93c10c955 (diff)
downloadrneovim-7c7039767aa4d715aea997721b0d759b308a43d4.tar.gz
rneovim-7c7039767aa4d715aea997721b0d759b308a43d4.tar.bz2
rneovim-7c7039767aa4d715aea997721b0d759b308a43d4.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/nvim/testdir/test_expr.vim')
-rw-r--r--src/nvim/testdir/test_expr.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim
index 710eae9b8b..d32facaa98 100644
--- a/src/nvim/testdir/test_expr.vim
+++ b/src/nvim/testdir/test_expr.vim
@@ -384,9 +384,10 @@ func Test_substitute_expr()
\ {-> submatch(2) . submatch(3) . submatch(1)}, ''))
func Recurse()
- return substitute('yyy', 'y*', {-> g:val}, '')
+ return substitute('yyy', 'y\(.\)y', {-> submatch(1)}, '')
endfunc
- call assert_equal('--', substitute('xxx', 'x*', {-> '-' . Recurse() . '-'}, ''))
+ " recursive call works
+ call assert_equal('-y-x-', substitute('xxx', 'x\(.\)x', {-> '-' . Recurse() . '-' . submatch(1) . '-'}, ''))
endfunc
func Test_invalid_submatch()