]> granicus.if.org Git - vim/commitdiff
patch 8.1.0625: MS-Windows: terminal test fails in white console v8.1.0625
authorBram Moolenaar <Bram@vim.org>
Sat, 22 Dec 2018 17:25:30 +0000 (18:25 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 22 Dec 2018 17:25:30 +0000 (18:25 +0100)
Problem:    MS-Windows: terminal test fails in white console.
Solution:   Accept both white and black background colors.

src/testdir/test_terminal.vim
src/version.c

index 220b1d13ee1332f7d2e309cfe7a38dff446b0624..f31c221e1ffd0add5ef847f439ebdbfd561b00d1 100644 (file)
@@ -159,10 +159,16 @@ func Check_123(buf)
   call assert_equal('2', l[1].chars)
   call assert_equal('3', l[2].chars)
   call assert_equal('#00e000', l[0].fg)
-  if &background == 'light'
-    call assert_equal('#ffffff', l[0].bg)
+  if has('win32')
+    " On Windows 'background' always defaults to dark, even though the terminal
+    " may use a light background.  Therefore accept both white and black.
+    call assert_match('#ffffff\|#000000', l[0].bg)
   else
-    call assert_equal('#000000', l[0].bg)
+    if &background == 'light'
+      call assert_equal('#ffffff', l[0].bg)
+    else
+      call assert_equal('#000000', l[0].bg)
+    endif
   endif
 
   let l = term_getline(a:buf, -1)
index 3321974a5b7448b654ea3118895c06ca2350a81f..594be524d9e3a2a85dab0925948f4ef8b1929a4b 100644 (file)
@@ -799,6 +799,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    625,
 /**/
     624,
 /**/