]> granicus.if.org Git - vim/commitdiff
patch 8.1.0705: :colorscheme isn't tested enough v8.1.0705
authorBram Moolenaar <Bram@vim.org>
Tue, 8 Jan 2019 20:05:51 +0000 (21:05 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 8 Jan 2019 20:05:51 +0000 (21:05 +0100)
Problem:    :colorscheme isn't tested enough
Solution:   Improve test coverage of :colorscheme. (Dominique Pelle, closes
            #3777)  Remove unnecessary sleep.

src/testdir/test_gui.vim
src/version.c

index 0775b178fb79ee8a2044d614e4d796e8ea75f5fc..7874fffa064c613d0fc3475b6cd701e2780c255d 100644 (file)
@@ -42,10 +42,15 @@ func Test_colorscheme()
 
   colorscheme torte
   redraw!
-  sleep 200m
   call assert_equal('dark', &background)
   call assert_equal(1, g:before_colors)
   call assert_equal(2, g:after_colors)
+  call assert_equal("\ntorte", execute('colorscheme'))
+
+  let a = substitute(execute('hi Search'), "\n\\s\\+", ' ', 'g')
+  call assert_match("\nSearch         xxx term=reverse ctermfg=0 ctermbg=12 gui=bold guifg=Black guibg=Red", a)
+
+  call assert_fails('colorscheme does_not_exist', 'E185:')
 
   exec 'colorscheme' colorscheme_saved
   augroup TestColors
index 95f3859020a0ab32772ee02752a0377c35363374..e772d05b209a43ad04456b04d15b31e9b6013ee9 100644 (file)
@@ -799,6 +799,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    705,
 /**/
     704,
 /**/