diff options
| author | James McCoy <jamessan@jamessan.com> | 2017-07-29 18:25:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-29 18:25:14 -0400 |
| commit | a4d1505435712055ab4269bc3db7ac3ba3e1ba28 (patch) | |
| tree | 10655943a978a072415b1447e07e4d0319ce68f3 /src/nvim/testdir/test_expr.vim | |
| parent | dc3c06e73dfd04948c59ea029daef1626e0386f8 (diff) | |
| parent | fe0bcc08003c82af7742636d3f7a95a1c91cf909 (diff) | |
| download | rneovim-a4d1505435712055ab4269bc3db7ac3ba3e1ba28.tar.gz rneovim-a4d1505435712055ab4269bc3db7ac3ba3e1ba28.tar.bz2 rneovim-a4d1505435712055ab4269bc3db7ac3ba3e1ba28.zip | |
Merge pull request #7068 from jbradaric/vim-8.0.0020
vim-patch:8.0.0020
Closes #6910
Diffstat (limited to 'src/nvim/testdir/test_expr.vim')
| -rw-r--r-- | src/nvim/testdir/test_expr.vim | 5 |
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() |