]> granicus.if.org Git - vim/commitdiff
patch 8.0.0293: some tests have a one or three second wait v8.0.0293
authorBram Moolenaar <Bram@vim.org>
Wed, 1 Feb 2017 21:31:49 +0000 (22:31 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 1 Feb 2017 21:31:49 +0000 (22:31 +0100)
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.

src/misc1.c
src/testdir/runtest.vim
src/testdir/test_normal.vim
src/version.c

index f95c3fe477da1d38b16b06e58a4e4bf7b08cf949..2a2d9cf647c9c75bd1b77635783ea10b330928ab 100644 (file)
@@ -3264,7 +3264,11 @@ change_warning(
 #endif
        msg_clr_eos();
        (void)msg_end();
-       if (msg_silent == 0 && !silent_mode)
+       if (msg_silent == 0 && !silent_mode
+#ifdef FEAT_EVAL
+               && time_for_testing != 1
+#endif
+               )
        {
            out_flush();
            ui_delay(1000L, TRUE); /* give the user time to think about it */
index 430b89ac266a9a457c9d22ea16547fa6757cc865..43192c450c8826d4ba39a2059d799c71408a19da 100644 (file)
@@ -57,9 +57,6 @@ else
   set encoding=latin1
 endif
 
-" Avoid stopping at the "hit enter" prompt
-set nomore
-
 " Output all messages in English.
 lang mess C
 
@@ -88,6 +85,14 @@ endfunc
 
 function RunTheTest(test)
   echo 'Executing ' . a:test
+
+  " Avoid stopping at the "hit enter" prompt
+  set nomore
+
+  " Avoid a three second wait when a message is about to be overwritten by the
+  " mode message.
+  set noshowmode
+
   if exists("*SetUp")
     try
       call SetUp()
index 98177851abfdbcc9f5c1613c3553d2254d9b018a..3af79f8d04696aa44f038584375ef8c99dd452ba 100644 (file)
@@ -2193,6 +2193,8 @@ func! Test_normal51_FileChangedRO()
   if !has("autocmd")
     return
   endif
+  " Don't sleep after the warning message.
+  call test_settime(1)
   call writefile(['foo'], 'Xreadonly.log')
   new Xreadonly.log
   setl ro
@@ -2202,6 +2204,7 @@ func! Test_normal51_FileChangedRO()
   call assert_equal('Xreadonly.log', bufname(''))
 
   " cleanup
+  call test_settime(0)
   bw!
   call delete("Xreadonly.log")
 endfunc
index 1d83da4d7131e671a51c2c5faa7e7a939bfb1dee..0a5e3d3298304835304f8f9948da5ae1def09433 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    293,
 /**/
     292,
 /**/