diff options
| author | ZyX <kp-pav@yandex.ru> | 2017-07-31 02:05:02 +0300 |
|---|---|---|
| committer | ZyX <kp-pav@yandex.ru> | 2017-07-31 02:05:02 +0300 |
| commit | fbe60af538aa6c723779ae7a816de845460619ae (patch) | |
| tree | b541ffeeaa5046de170cac688c72aeb891c61ebb /src/nvim/testdir/test_expr.vim | |
| parent | 1011462b40502e6039494e70a870f0360f152b1b (diff) | |
| parent | 13e8356f52d9dc1da96179ee425168740874c8c7 (diff) | |
| download | rneovim-fbe60af538aa6c723779ae7a816de845460619ae.tar.gz rneovim-fbe60af538aa6c723779ae7a816de845460619ae.tar.bz2 rneovim-fbe60af538aa6c723779ae7a816de845460619ae.zip | |
Merge branch 'master' into colored-cmdline
Diffstat (limited to 'src/nvim/testdir/test_expr.vim')
| -rw-r--r-- | src/nvim/testdir/test_expr.vim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim index 82c5d21bd0..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() @@ -418,6 +419,9 @@ func Test_function_with_funcref() let s:fref = function(s:f) call assert_equal(v:t_string, s:fref('x')) call assert_fails("call function('s:f')", 'E700:') + + call assert_fails("call function('foo()')", 'E475:') + call assert_fails("call function('foo()')", 'foo()') endfunc func Test_funcref() |