comparison src/testdir/test_prompt_buffer.vim @ 30592:457ea0570b6f v9.0.0631

patch 9.0.0631: too many delete() calls in tests Commit: https://github.com/vim/vim/commit/145d1fd91041bd2a22a11eef0357702e420796e2 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 30 21:57:11 2022 +0100 patch 9.0.0631: 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 Fri, 30 Sep 2022 23:00:10 +0200
parents b93e176e7998
children f936d46cc9c1
comparison
equal deleted inserted replaced
30591:38ef10db4a4e 30592:457ea0570b6f
235 \ do echo line; 235 \ do echo line;
236 \ sleep 0.1; 236 \ sleep 0.1;
237 \ done'], #{out_io: 'buffer', out_name: ''}) 237 \ done'], #{out_io: 'buffer', out_name: ''})
238 startinsert 238 startinsert
239 END 239 END
240 eval script->writefile(scriptName) 240 eval script->writefile(scriptName, 'D')
241 241
242 let buf = RunVimInTerminal('-S ' .. scriptName, {}) 242 let buf = RunVimInTerminal('-S ' .. scriptName, {})
243 call WaitForAssert({-> assert_equal('cmd:', term_getline(buf, 1))}) 243 call WaitForAssert({-> assert_equal('cmd:', term_getline(buf, 1))})
244 244
245 call term_sendkeys(buf, 'test') 245 call term_sendkeys(buf, 'test')
248 call WaitForAssert({-> assert_equal('cmd:testtest', term_getline(buf, 1))}) 248 call WaitForAssert({-> assert_equal('cmd:testtest', term_getline(buf, 1))})
249 call term_sendkeys(buf, 'test') 249 call term_sendkeys(buf, 'test')
250 call WaitForAssert({-> assert_equal('cmd:testtesttest', term_getline(buf, 1))}) 250 call WaitForAssert({-> assert_equal('cmd:testtesttest', term_getline(buf, 1))})
251 251
252 call StopVimInTerminal(buf) 252 call StopVimInTerminal(buf)
253 call delete(scriptName)
254 endfunc 253 endfunc
255 254
256 " vim: shiftwidth=2 sts=2 expandtab 255 " vim: shiftwidth=2 sts=2 expandtab