comparison src/testdir/test_viminfo.vim @ 9313:c0760b25f31d v7.4.1939

commit https://github.com/vim/vim/commit/28607ba2b82668503f8406bc13690d59af46deb3 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 15 21:44:51 2016 +0200 patch 7.4.1939 Problem: Memory access error when reading viminfo. (Dominique Pelle) Solution: Correct index in jumplist when at the end.
author Christian Brabandt <cb@256bit.org>
date Wed, 15 Jun 2016 21:45:05 +0200
parents 8000f0a44744
children 1003973c99df
comparison
equal deleted inserted replaced
9312:96b65a1b7964 9313:c0760b25f31d
320 " Test merge when writing 320 " Test merge when writing
321 wviminfo Xviminfo 321 wviminfo Xviminfo
322 clearjumps 322 clearjumps
323 rviminfo Xviminfo 323 rviminfo Xviminfo
324 324
325 let last_line = line('.')
325 exe "normal \<C-O>" 326 exe "normal \<C-O>"
326 call assert_equal('time 30', getline('.')) 327 call assert_equal('time 30', getline('.'))
327 exe "normal \<C-O>" 328 exe "normal \<C-O>"
328 call assert_equal('last pos', getline('.')) 329 call assert_equal('last pos', getline('.'))
329 exe "normal \<C-O>" 330 exe "normal \<C-O>"
333 call assert_equal('time 15', getline('.')) 334 call assert_equal('time 15', getline('.'))
334 exe "normal \<C-O>" 335 exe "normal \<C-O>"
335 call assert_equal('time 10', getline('.')) 336 call assert_equal('time 10', getline('.'))
336 exe "normal \<C-O>" 337 exe "normal \<C-O>"
337 call assert_equal('time 05', getline('.')) 338 call assert_equal('time 05', getline('.'))
339
340 " Test with jumplist full.
341 clearjumps
342 call setline(1, repeat(['match here'], 101))
343 call cursor(1, 1)
344 call test_settime(10)
345 for i in range(100)
346 exe "normal /here\r"
347 endfor
348 rviminfo Xviminfo
349
350 " must be newest mark that comes from viminfo.
351 exe "normal \<C-O>"
352 call assert_equal(last_line, line('.'))
338 353
339 bwipe! 354 bwipe!
340 call delete('Xviminfo') 355 call delete('Xviminfo')
341 endfunc 356 endfunc
342 357