comparison src/testdir/test_excmd.vim @ 19435:8f8a5a15d00a v8.2.0275

patch 8.2.0275: some Ex code not covered by tests Commit: https://github.com/vim/vim/commit/406cd90f1963ca60813db91c413eef4b1b78ee44 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 18 21:54:41 2020 +0100 patch 8.2.0275: some Ex code not covered by tests Problem: Some Ex code not covered by tests. Solution: Add test cases. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5659)
author Bram Moolenaar <Bram@vim.org>
date Tue, 18 Feb 2020 22:00:04 +0100
parents 67fbe280a502
children cb73f4ae6b7c
comparison
equal deleted inserted replaced
19434:4f7cdab4da93 19435:8f8a5a15d00a
236 call StopVimInTerminal(buf) 236 call StopVimInTerminal(buf)
237 237
238 call assert_equal(['foo4'], readfile('foo')) 238 call assert_equal(['foo4'], readfile('foo'))
239 call assert_equal(['bar2'], readfile('bar')) 239 call assert_equal(['bar2'], readfile('bar'))
240 240
241 " Test for closing a window with a modified buffer
242 let buf = RunVimInTerminal('', {'rows': 20})
243 call term_sendkeys(buf, ":set nomore\n")
244 call term_sendkeys(buf, ":new\n")
245 call term_sendkeys(buf, ":call setline(1, 'abc')\n")
246 call term_sendkeys(buf, ":confirm close\n")
247 call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$',
248 \ term_getline(buf, 20))}, 1000)
249 call term_sendkeys(buf, "C")
250 call term_sendkeys(buf, ":confirm close\n")
251 call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$',
252 \ term_getline(buf, 20))}, 1000)
253 call term_sendkeys(buf, "N")
254 call term_sendkeys(buf, ":quit\n")
255 call StopVimInTerminal(buf)
256
241 call delete('foo') 257 call delete('foo')
242 call delete('bar') 258 call delete('bar')
243 endfunc 259 endfunc
244 260
245 " Test for the :print command 261 " Test for the :print command