To: vim_dev@googlegroups.com Subject: Patch 8.1.0875 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.0875 Problem: Not all errors of marks and findfile()/finddir() are tested. Solution: Add more test coverage. (Dominique Pelle) Files: src/testdir/test_findfile.vim, src/testdir/test_marks.vim *** ../vim-8.1.0874/src/testdir/test_findfile.vim 2019-01-30 22:13:30.409988847 +0100 --- src/testdir/test_findfile.vim 2019-02-04 21:13:58.261374549 +0100 *************** *** 119,124 **** --- 119,132 ---- 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,169 **** --- 175,185 ---- 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 *** ../vim-8.1.0874/src/testdir/test_marks.vim 2019-01-24 17:59:35.139217458 +0100 --- src/testdir/test_marks.vim 2019-02-04 21:13:58.261374549 +0100 *************** *** 133,135 **** --- 133,176 ---- bwipe! endfunc + + func Test_delmarks() + new + norm mx + norm `x + delmarks x + call assert_fails('norm `x', 'E20:') + + " Deleting an already deleted mark should not fail. + delmarks x + + " Test deleting a range of marks. + norm ma + norm mb + norm mc + norm mz + delmarks b-z + norm `a + call assert_fails('norm `b', 'E20:') + call assert_fails('norm `c', 'E20:') + call assert_fails('norm `z', 'E20:') + call assert_fails('delmarks z-b', 'E475:') + + call assert_fails('delmarks', 'E471:') + call assert_fails('delmarks /', 'E475:') + + " Test delmarks! + norm mx + norm `x + delmarks! + call assert_fails('norm `x', 'E20:') + call assert_fails('delmarks! x', 'E474:') + + bwipe! + endfunc + + func Test_mark_error() + call assert_fails('mark', 'E471:') + call assert_fails('mark xx', 'E488:') + call assert_fails('mark _', 'E191:') + endfunc *** ../vim-8.1.0874/src/version.c 2019-02-04 20:30:13.973460115 +0100 --- src/version.c 2019-02-04 21:13:09.765720718 +0100 *************** *** 785,786 **** --- 785,788 ---- { /* Add new patch number below this line */ + /**/ + 875, /**/ -- LAUNCELOT: Isn't there a St. Aaaaarrrrrrggghhh's in Cornwall? ARTHUR: No, that's Saint Ives. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///