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_marks.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_marks.vim')
| -rw-r--r-- | src/nvim/testdir/test_marks.vim | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_marks.vim b/src/nvim/testdir/test_marks.vim index 8858cd22b8..7fd115fd68 100644 --- a/src/nvim/testdir/test_marks.vim +++ b/src/nvim/testdir/test_marks.vim @@ -136,3 +136,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 |