comparison src/testdir/test_marks.vim @ 19625:f70a3c1000bb v8.2.0369

patch 8.2.0369: various Normal mode commands not fully tested Commit: https://github.com/vim/vim/commit/1671f4488105ee12a6a8558ae351436c26ab55fc Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 10 07:48:13 2020 +0100 patch 8.2.0369: various Normal mode commands not fully tested Problem: Various Normal mode commands not fully tested. Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5751)
author Bram Moolenaar <Bram@vim.org>
date Tue, 10 Mar 2020 08:00:06 +0100
parents 2f4be7ca1b1b
children b3e93a05c3ca
comparison
equal deleted inserted replaced
19624:ce4838c19ca1 19625:f70a3c1000bb
193 193
194 func Test_mark_error() 194 func Test_mark_error()
195 call assert_fails('mark', 'E471:') 195 call assert_fails('mark', 'E471:')
196 call assert_fails('mark xx', 'E488:') 196 call assert_fails('mark xx', 'E488:')
197 call assert_fails('mark _', 'E191:') 197 call assert_fails('mark _', 'E191:')
198 call assert_beeps('normal! m~')
198 endfunc 199 endfunc
199 200
200 " Test for :lockmarks when pasting content 201 " Test for :lockmarks when pasting content
201 func Test_lockmarks_with_put() 202 func Test_lockmarks_with_put()
202 new 203 new
219 1,3kr 220 1,3kr
220 call assert_equal([0, 3, 1, 0], getpos("'r")) 221 call assert_equal([0, 3, 1, 0], getpos("'r"))
221 close! 222 close!
222 endfunc 223 endfunc
223 224
225 " Test for file marks (A-Z)
226 func Test_file_mark()
227 new Xone
228 call setline(1, ['aaa', 'bbb'])
229 norm! G$mB
230 w!
231 new Xtwo
232 call setline(1, ['ccc', 'ddd'])
233 norm! GmD
234 w!
235
236 enew
237 normal! `B
238 call assert_equal('Xone', bufname())
239 call assert_equal([2, 3], [line('.'), col('.')])
240 normal! 'D
241 call assert_equal('Xtwo', bufname())
242 call assert_equal([2, 1], [line('.'), col('.')])
243
244 call delete('Xone')
245 call delete('Xtwo')
246 endfunc
247
224 " vim: shiftwidth=2 sts=2 expandtab 248 " vim: shiftwidth=2 sts=2 expandtab