Mercurial > vim
comparison src/testdir/test_match.vim @ 20625:116c7bd5e980 v8.2.0866
patch 8.2.0866: not enough tests for buffer writing
Commit: https://github.com/vim/vim/commit/494e9069cb32620f7688a7cb128a3feff827639e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 31 21:28:02 2020 +0200
patch 8.2.0866: not enough tests for buffer writing
Problem: Not enough tests for buffer writing.
Solution: Add more tests. Use CheckRunVimInTerminal in more places.
(Yegappan Lakshmanan, closes #6167)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 31 May 2020 21:30:03 +0200 |
parents | 2fb397573541 |
children | f3c72001de63 |
comparison
equal
deleted
inserted
replaced
20624:f782c48d548a | 20625:116c7bd5e980 |
---|---|
311 call assert_fails("call matchdelete(0)", 'E802:') | 311 call assert_fails("call matchdelete(0)", 'E802:') |
312 call assert_fails("call matchdelete(1, -1)", 'E957:') | 312 call assert_fails("call matchdelete(1, -1)", 'E957:') |
313 endfunc | 313 endfunc |
314 | 314 |
315 func Test_matchclear_other_window() | 315 func Test_matchclear_other_window() |
316 if !CanRunVimInTerminal() | 316 CheckRunVimInTerminal |
317 throw 'Skipped: cannot make screendumps' | |
318 endif | |
319 let buf = OtherWindowCommon() | 317 let buf = OtherWindowCommon() |
320 call term_sendkeys(buf, ":call clearmatches(winid)\<CR>") | 318 call term_sendkeys(buf, ":call clearmatches(winid)\<CR>") |
321 call VerifyScreenDump(buf, 'Test_matchclear_1', {}) | 319 call VerifyScreenDump(buf, 'Test_matchclear_1', {}) |
322 | 320 |
323 call StopVimInTerminal(buf) | 321 call StopVimInTerminal(buf) |
324 call delete('XscriptMatchCommon') | 322 call delete('XscriptMatchCommon') |
325 endfunc | 323 endfunc |
326 | 324 |
327 func Test_matchadd_other_window() | 325 func Test_matchadd_other_window() |
328 if !CanRunVimInTerminal() | 326 CheckRunVimInTerminal |
329 throw 'Skipped: cannot make screendumps' | |
330 endif | |
331 let buf = OtherWindowCommon() | 327 let buf = OtherWindowCommon() |
332 call term_sendkeys(buf, ":call matchadd('Search', 'Hello', 1, -1, #{window: winid})\<CR>") | 328 call term_sendkeys(buf, ":call matchadd('Search', 'Hello', 1, -1, #{window: winid})\<CR>") |
333 call term_sendkeys(buf, ":\<CR>") | 329 call term_sendkeys(buf, ":\<CR>") |
334 call VerifyScreenDump(buf, 'Test_matchadd_1', {}) | 330 call VerifyScreenDump(buf, 'Test_matchadd_1', {}) |
335 | 331 |