diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-03-05 00:09:23 -0500 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-03-05 00:09:30 -0500 |
| commit | 04059312b075573b3e008abada1544159a127bfa (patch) | |
| tree | b6ebb3056509c2be772fa3fb3b67b6216c4d0826 /src/nvim/testdir/test_findfile.vim | |
| parent | cbab746fd871ee3544927ee69f281f42b358f57c (diff) | |
| download | rneovim-04059312b075573b3e008abada1544159a127bfa.tar.gz rneovim-04059312b075573b3e008abada1544159a127bfa.tar.bz2 rneovim-04059312b075573b3e008abada1544159a127bfa.zip | |
vim-patch:8.1.0875: not all errors of marks and findfile()/finddir() are tested
Problem: Not all errors of marks and findfile()/finddir() are tested.
Solution: Add more test coverage. (Dominique Pelle)
https://github.com/vim/vim/commit/71b13e92ae580038b8aecbb783296c577ca2ba5a
Diffstat (limited to 'src/nvim/testdir/test_findfile.vim')
| -rw-r--r-- | src/nvim/testdir/test_findfile.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_findfile.vim b/src/nvim/testdir/test_findfile.vim index 78e51ed836..0bae161a8b 100644 --- a/src/nvim/testdir/test_findfile.vim +++ b/src/nvim/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 |