Mercurial > vim
comparison src/testdir/test_terminal.vim @ 22742:f7f2d73ff85e v8.2.1919
patch 8.2.1919: assert_fails() setting emsg_silent changes normal execution
Commit: https://github.com/vim/vim/commit/28ee892ac4197421b3317f195512ca64cc56a5b4
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Oct 28 20:20:00 2020 +0100
patch 8.2.1919: assert_fails() setting emsg_silent changes normal execution
Problem: Assert_fails() setting emsg_silent changes normal execution.
Solution: Use a separate flag in_assert_fails.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 28 Oct 2020 20:30:04 +0100 |
parents | 5e287462487e |
children | 2e681033d766 |
comparison
equal
deleted
inserted
replaced
22741:8c4ba2a7a44f | 22742:f7f2d73ff85e |
---|---|
63 call StopShellInTerminal(buf) | 63 call StopShellInTerminal(buf) |
64 call TermWait(buf) | 64 call TermWait(buf) |
65 | 65 |
66 setlocal modifiable | 66 setlocal modifiable |
67 exe "normal Axxx\<Esc>" | 67 exe "normal Axxx\<Esc>" |
68 call assert_fails(buf . 'bwipe', ['E89:', 'E517:']) | 68 call assert_fails(buf . 'bwipe', 'E89:') |
69 undo | 69 undo |
70 | 70 |
71 exe buf . 'bwipe' | 71 exe buf . 'bwipe' |
72 unlet g:job | 72 unlet g:job |
73 endfunc | 73 endfunc |
87 unlet g:job | 87 unlet g:job |
88 endfunc | 88 endfunc |
89 | 89 |
90 func Test_terminal_wipe_buffer() | 90 func Test_terminal_wipe_buffer() |
91 let buf = Run_shell_in_terminal({}) | 91 let buf = Run_shell_in_terminal({}) |
92 call assert_fails(buf . 'bwipe', ['E89:', 'E517:']) | 92 call assert_fails(buf . 'bwipe', 'E89:') |
93 exe buf . 'bwipe!' | 93 exe buf . 'bwipe!' |
94 call WaitForAssert({-> assert_equal('dead', job_status(g:job))}) | 94 call WaitForAssert({-> assert_equal('dead', job_status(g:job))}) |
95 call assert_equal("", bufname(buf)) | 95 call assert_equal("", bufname(buf)) |
96 | 96 |
97 unlet g:job | 97 unlet g:job |
646 exe buf . 'bwipe' | 646 exe buf . 'bwipe' |
647 endfunc | 647 endfunc |
648 | 648 |
649 func Test_terminal_list_args() | 649 func Test_terminal_list_args() |
650 let buf = term_start([&shell, &shellcmdflag, 'echo "123"']) | 650 let buf = term_start([&shell, &shellcmdflag, 'echo "123"']) |
651 call assert_fails(buf . 'bwipe', ['E89:', 'E517:']) | 651 call assert_fails(buf . 'bwipe', 'E89:') |
652 exe buf . 'bwipe!' | 652 exe buf . 'bwipe!' |
653 call assert_equal("", bufname(buf)) | 653 call assert_equal("", bufname(buf)) |
654 endfunction | 654 endfunction |
655 | 655 |
656 func Test_terminal_noblock() | 656 func Test_terminal_noblock() |