diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-11-05 20:59:28 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-11-05 20:59:28 +0100 |
commit | fb094e14c19337de824d4e6710ca6a2617930ab0 (patch) | |
tree | 4738265336181b11c8f7bb6d5b7f41d92753a208 /src/testdir/test_fold.vim | |
parent | 8fdb35a974d92c7d0267bc8988aa6af74ee6885d (diff) | |
download | vim-git-fb094e14c19337de824d4e6710ca6a2617930ab0.tar.gz |
patch 8.0.1271: still too many old style testsv8.0.1271
Problem: Still too many old style tests.
Solution: Convert a few more tests to new style. (Yegappan Lakshmanan,
closes #2290)
Diffstat (limited to 'src/testdir/test_fold.vim')
-rw-r--r-- | src/testdir/test_fold.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/testdir/test_fold.vim b/src/testdir/test_fold.vim index 5ebf38f7a..de6688365 100644 --- a/src/testdir/test_fold.vim +++ b/src/testdir/test_fold.vim @@ -627,3 +627,24 @@ func Test_fold_move() set fdm& sw& fdl& enew! 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 |