diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2018-02-12 02:59:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-12 02:59:29 +0100 |
| commit | 9e9e4431c122f3b98fb0e7498b6572ceac0bca53 (patch) | |
| tree | a28f207390cdbbd27a468537e9065f3b8bfa1cbd /src/nvim/testdir/test_fold.vim | |
| parent | 418947fcb34c46af895994ef9ba10a85d2d4c6c2 (diff) | |
| parent | 7da4d1561bd29615257a3f61073b5cf39f1f7463 (diff) | |
| download | rneovim-9e9e4431c122f3b98fb0e7498b6572ceac0bca53.tar.gz rneovim-9e9e4431c122f3b98fb0e7498b6572ceac0bca53.tar.bz2 rneovim-9e9e4431c122f3b98fb0e7498b6572ceac0bca53.zip | |
Merge #8001 from justinmk/vimpatches
Diffstat (limited to 'src/nvim/testdir/test_fold.vim')
| -rw-r--r-- | src/nvim/testdir/test_fold.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim index 46c54e8614..7c6d38d7ec 100644 --- a/src/nvim/testdir/test_fold.vim +++ b/src/nvim/testdir/test_fold.vim @@ -360,3 +360,24 @@ func! Test_move_folds_around_indent() call assert_equal([0, 1, 1, 1, 1, 0, 0, 0, 1, 1], map(range(1, line('$')), 'foldlevel(v:val)')) bw! endfunc + +" test for patch 7.3.637 +" Cannot catch the error caused by a foldopen when there is no fold. +func Test_foldopen_exception() + enew! + let a = 'No error caught' + try + foldopen + catch + let a = matchstr(v:exception,'^[^ ]*') + endtry + call assert_equal('Vim(foldopen):E490:', a) + + let a = 'No error caught' + try + foobar + catch + let a = matchstr(v:exception,'^[^ ]*') + endtry + call assert_match('E492:', a) +endfunc |