comparison src/testdir/test_jumplist.vim @ 30580:f08ed0738f7a v9.0.0625

patch 9.0.0625: too many delete() calls in tests Commit: https://github.com/vim/vim/commit/7dd5a78b88af7734bdbf236fdfafb49f27a0ca2e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 29 21:01:57 2022 +0100 patch 9.0.0625: too many delete() calls in tests Problem: Too many delete() calls in tests. Solution: Use deferred delete where possible.
author Bram Moolenaar <Bram@vim.org>
date Thu, 29 Sep 2022 22:15:04 +0200
parents 320991d9812e
children 1f3bcb7f3bd0
comparison
equal deleted inserted replaced
30579:e298ce7862f7 30580:f08ed0738f7a
13 13
14 let lines = [] 14 let lines = []
15 for i in range(1, 100) 15 for i in range(1, 100)
16 call add(lines, "Line " . i) 16 call add(lines, "Line " . i)
17 endfor 17 endfor
18 call writefile(lines, "Xtest") 18 call writefile(lines, "Xtest", 'D')
19 19
20 " Jump around and create a jump list 20 " Jump around and create a jump list
21 edit Xtest 21 edit Xtest
22 let bnr = bufnr('%') 22 let bnr = bufnr('%')
23 normal 50% 23 normal 50%
55 call test_garbagecollect_now() 55 call test_garbagecollect_now()
56 call assert_equal(4, l[1]) 56 call assert_equal(4, l[1])
57 clearjumps 57 clearjumps
58 call test_garbagecollect_now() 58 call test_garbagecollect_now()
59 call assert_equal(4, l[1]) 59 call assert_equal(4, l[1])
60
61 call delete("Xtest")
62 endfunc 60 endfunc
63 61
64 func Test_jumplist_invalid() 62 func Test_jumplist_invalid()
65 new 63 new
66 clearjumps 64 clearjumps