0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.1.0970: text properties test fails when 'encoding' is not utf-8

Problem:    Text properties test fails when 'encoding' is not utf-8.
Solution:   Compare with original value of 'encoding'. (Christian Brabandt,
            closes #3986)
This commit is contained in:
Bram Moolenaar 2019-02-22 14:38:58 +01:00
parent 97c2c05ead
commit ed79d1e348
3 changed files with 7 additions and 2 deletions

View File

@ -50,7 +50,9 @@ source setup.vim
set nocp viminfo+=nviminfo set nocp viminfo+=nviminfo
" Use utf-8 by default, instead of whatever the system default happens to be. " Use utf-8 by default, instead of whatever the system default happens to be.
" Individual tests can overrule this at the top of the file. " Individual tests can overrule this at the top of the file and use
" g:orig_encoding if needed.
let g:orig_encoding = &encoding
set encoding=utf-8 set encoding=utf-8
" REDIR_TEST_TO_NULL has a very permissive SwapExists autocommand which is for " REDIR_TEST_TO_NULL has a very permissive SwapExists autocommand which is for

View File

@ -518,7 +518,8 @@ endfunc
" screenshot test with textprop highlighting " screenshot test with textprop highlighting
funct Test_textprop_screenshots() funct Test_textprop_screenshots()
if !CanRunVimInTerminal() || &encoding != 'utf-8' " The Vim running in the terminal needs to use utf-8.
if !CanRunVimInTerminal() || g:orig_encoding != 'utf-8'
return return
endif endif
call writefile([ call writefile([

View File

@ -779,6 +779,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
970,
/**/ /**/
969, 969,
/**/ /**/