Mercurial > vim
comparison src/testdir/test_marks.vim @ 15736:6839f99d2269 v8.1.0875
patch 8.1.0875: not all errors of marks and findfile()/finddir() are tested
commit https://github.com/vim/vim/commit/71b13e92ae580038b8aecbb783296c577ca2ba5a
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Feb 4 21:14:45 2019 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 04 Feb 2019 21:15:07 +0100 |
parents | 2dcaa860e3fc |
children | 7b57a80f70f6 |
comparison
equal
deleted
inserted
replaced
15735:5688ec97294b | 15736:6839f99d2269 |
---|---|
131 let expected = ' a 1 0 ' . repeat('á', &columns - 16) | 131 let expected = ' a 1 0 ' . repeat('á', &columns - 16) |
132 call assert_equal(expected, a[1]) | 132 call assert_equal(expected, a[1]) |
133 | 133 |
134 bwipe! | 134 bwipe! |
135 endfunc | 135 endfunc |
136 | |
137 func Test_delmarks() | |
138 new | |
139 norm mx | |
140 norm `x | |
141 delmarks x | |
142 call assert_fails('norm `x', 'E20:') | |
143 | |
144 " Deleting an already deleted mark should not fail. | |
145 delmarks x | |
146 | |
147 " Test deleting a range of marks. | |
148 norm ma | |
149 norm mb | |
150 norm mc | |
151 norm mz | |
152 delmarks b-z | |
153 norm `a | |
154 call assert_fails('norm `b', 'E20:') | |
155 call assert_fails('norm `c', 'E20:') | |
156 call assert_fails('norm `z', 'E20:') | |
157 call assert_fails('delmarks z-b', 'E475:') | |
158 | |
159 call assert_fails('delmarks', 'E471:') | |
160 call assert_fails('delmarks /', 'E475:') | |
161 | |
162 " Test delmarks! | |
163 norm mx | |
164 norm `x | |
165 delmarks! | |
166 call assert_fails('norm `x', 'E20:') | |
167 call assert_fails('delmarks! x', 'E474:') | |
168 | |
169 bwipe! | |
170 endfunc | |
171 | |
172 func Test_mark_error() | |
173 call assert_fails('mark', 'E471:') | |
174 call assert_fails('mark xx', 'E488:') | |
175 call assert_fails('mark _', 'E191:') | |
176 endfunc |