Mercurial > vim
comparison src/testdir/test_assert.vim @ 31022:9a5e540510cf v9.0.0846
patch 9.0.0846: using assert_fails() may cause hit-enter prompt
Commit: https://github.com/vim/vim/commit/f220643c260d55d21a841a3c4032daadc41bc50b
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Nov 9 00:44:30 2022 +0000
patch 9.0.0846: using assert_fails() may cause hit-enter prompt
Problem: Using assert_fails() may cause hit-enter prompt.
Solution: Set no_wait_return. (closes https://github.com/vim/vim/issues/11522)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 09 Nov 2022 01:45:03 +0100 |
parents | 56e38195570b |
children | 220215b8a7c9 |
comparison
equal
deleted
inserted
replaced
31021:57cf55d34f57 | 31022:9a5e540510cf |
---|---|
334 | 334 |
335 func Test_assert_fails_in_try_block() | 335 func Test_assert_fails_in_try_block() |
336 try | 336 try |
337 call assert_equal(0, assert_fails('throw "error"')) | 337 call assert_equal(0, assert_fails('throw "error"')) |
338 endtry | 338 endtry |
339 endfunc | |
340 | |
341 func Test_assert_fails_in_timer() | |
342 " should not cause a hit-enter prompt, which isn't actually checked here | |
343 call timer_start(0, {-> assert_fails('call', 'E471:')}) | |
344 sleep 10m | |
339 endfunc | 345 endfunc |
340 | 346 |
341 func Test_assert_beeps() | 347 func Test_assert_beeps() |
342 new | 348 new |
343 call assert_equal(0, assert_beeps('normal h')) | 349 call assert_equal(0, assert_beeps('normal h')) |