diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-02-04 21:14:45 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-02-04 21:14:45 +0100 |
commit | 71b13e92ae580038b8aecbb783296c577ca2ba5a (patch) | |
tree | 3537e168b860f2742f6029d70501b5ed7d15d345 /src/testdir/test_findfile.vim | |
parent | 94688b8a2a1fc3d6c8e49151b9533ec1c0a6757f (diff) | |
download | vim-git-71b13e92ae580038b8aecbb783296c577ca2ba5a.tar.gz |
patch 8.1.0875: not all errors of marks and findfile()/finddir() are testedv8.1.0875
Problem: Not all errors of marks and findfile()/finddir() are tested.
Solution: Add more test coverage. (Dominique Pelle)
Diffstat (limited to 'src/testdir/test_findfile.vim')
-rw-r--r-- | src/testdir/test_findfile.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test_findfile.vim b/src/testdir/test_findfile.vim index 78e51ed83..0bae161a8 100644 --- a/src/testdir/test_findfile.vim +++ b/src/testdir/test_findfile.vim @@ -119,6 +119,14 @@ func Test_findfile() let &shellslash = save_shellslash endfunc +func Test_findfile_error() + call assert_fails('call findfile([])', 'E730:') + call assert_fails('call findfile("x", [])', 'E730:') + call assert_fails('call findfile("x", "", [])', 'E745:') + call assert_fails('call findfile("x", "**x")', 'E343:') + call assert_fails('call findfile("x", repeat("x", 5000))', 'E854:') +endfunc + " Test finddir({name} [, {path} [, {count}]]) func Test_finddir() let save_path = &path @@ -167,3 +175,11 @@ func Test_finddir() let &path = save_path let &shellslash = save_shellslash endfunc + +func Test_finddir_error() + call assert_fails('call finddir([])', 'E730:') + call assert_fails('call finddir("x", [])', 'E730:') + call assert_fails('call finddir("x", "", [])', 'E745:') + call assert_fails('call finddir("x", "**x")', 'E343:') + call assert_fails('call finddir("x", repeat("x", 5000))', 'E854:') +endfunc |