comparison src/testdir/test_terminal.vim @ 15231:42ce33efb23d v8.1.0625

patch 8.1.0625: MS-Windows: terminal test fails in white console commit https://github.com/vim/vim/commit/81df63537e281da38b45bc1806e2b4582e804242 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 22 18:25:30 2018 +0100 patch 8.1.0625: MS-Windows: terminal test fails in white console Problem: MS-Windows: terminal test fails in white console. Solution: Accept both white and black background colors.
author Bram Moolenaar <Bram@vim.org>
date Sat, 22 Dec 2018 18:30:05 +0100
parents 49bc670c3ee9
children 74bc96b99f4f
comparison
equal deleted inserted replaced
15230:b879123385e0 15231:42ce33efb23d
157 call assert_true(len(l) > 0) 157 call assert_true(len(l) > 0)
158 call assert_equal('1', l[0].chars) 158 call assert_equal('1', l[0].chars)
159 call assert_equal('2', l[1].chars) 159 call assert_equal('2', l[1].chars)
160 call assert_equal('3', l[2].chars) 160 call assert_equal('3', l[2].chars)
161 call assert_equal('#00e000', l[0].fg) 161 call assert_equal('#00e000', l[0].fg)
162 if &background == 'light' 162 if has('win32')
163 call assert_equal('#ffffff', l[0].bg) 163 " On Windows 'background' always defaults to dark, even though the terminal
164 " may use a light background. Therefore accept both white and black.
165 call assert_match('#ffffff\|#000000', l[0].bg)
164 else 166 else
165 call assert_equal('#000000', l[0].bg) 167 if &background == 'light'
168 call assert_equal('#ffffff', l[0].bg)
169 else
170 call assert_equal('#000000', l[0].bg)
171 endif
166 endif 172 endif
167 173
168 let l = term_getline(a:buf, -1) 174 let l = term_getline(a:buf, -1)
169 call assert_equal('', l) 175 call assert_equal('', l)
170 let l = term_getline(a:buf, 0) 176 let l = term_getline(a:buf, 0)