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_marks.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_marks.vim')
-rw-r--r-- | src/testdir/test_marks.vim | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/testdir/test_marks.vim b/src/testdir/test_marks.vim index 2fb95a536..a9bba5780 100644 --- a/src/testdir/test_marks.vim +++ b/src/testdir/test_marks.vim @@ -133,3 +133,44 @@ func Test_marks_cmd_multibyte() 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 |