aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_fold.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-02-12 02:59:29 +0100
committerGitHub <noreply@github.com>2018-02-12 02:59:29 +0100
commit9e9e4431c122f3b98fb0e7498b6572ceac0bca53 (patch)
treea28f207390cdbbd27a468537e9065f3b8bfa1cbd /src/nvim/testdir/test_fold.vim
parent418947fcb34c46af895994ef9ba10a85d2d4c6c2 (diff)
parent7da4d1561bd29615257a3f61073b5cf39f1f7463 (diff)
downloadrneovim-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.vim21
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