Skip to content

Commit e5f2a07

Browse files
committed
patch 8.0.0293: some tests have a one or three second wait
Problem: Some tests have a one or three second wait. Solution: Reset the 'showmode' option. Use a test time of one to disable sleep after an error or warning message.
1 parent a2f2885 commit e5f2a07

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

src/misc1.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3264,7 +3264,11 @@ change_warning(
32643264
#endif
32653265
msg_clr_eos();
32663266
(void)msg_end();
3267-
if (msg_silent == 0 && !silent_mode)
3267+
if (msg_silent == 0 && !silent_mode
3268+
#ifdef FEAT_EVAL
3269+
&& time_for_testing != 1
3270+
#endif
3271+
)
32683272
{
32693273
out_flush();
32703274
ui_delay(1000L, TRUE); /* give the user time to think about it */

src/testdir/runtest.vim

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ else
5757
set encoding=latin1
5858
endif
5959

60-
" Avoid stopping at the "hit enter" prompt
61-
set nomore
62-
6360
" Output all messages in English.
6461
lang mess C
6562

@@ -88,6 +85,14 @@ endfunc
8885

8986
function RunTheTest(test)
9087
echo 'Executing ' . a:test
88+
89+
" Avoid stopping at the "hit enter" prompt
90+
set nomore
91+
92+
" Avoid a three second wait when a message is about to be overwritten by the
93+
" mode message.
94+
set noshowmode
95+
9196
if exists("*SetUp")
9297
try
9398
call SetUp()

src/testdir/test_normal.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2193,6 +2193,8 @@ func! Test_normal51_FileChangedRO()
21932193
if !has("autocmd")
21942194
return
21952195
endif
2196+
" Don't sleep after the warning message.
2197+
call test_settime(1)
21962198
call writefile(['foo'], 'Xreadonly.log')
21972199
new Xreadonly.log
21982200
setl ro
@@ -2202,6 +2204,7 @@ func! Test_normal51_FileChangedRO()
22022204
call assert_equal('Xreadonly.log', bufname(''))
22032205

22042206
" cleanup
2207+
call test_settime(0)
22052208
bw!
22062209
call delete("Xreadonly.log")
22072210
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
293,
767769
/**/
768770
292,
769771
/**/

0 commit comments

Comments
 (0)