Skip to content

Commit

Permalink
patch 8.1.0970: text properties test fails when 'encoding' is not utf-8
Browse files Browse the repository at this point in the history
Problem:    Text properties test fails when 'encoding' is not utf-8.
Solution:   Compare with original value of 'encoding'. (Christian Brabandt,
            closes #3986)
  • Loading branch information
brammool committed Feb 22, 2019
1 parent 97c2c05 commit ed79d1e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/testdir/runtest.vim
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ source setup.vim
set nocp viminfo+=nviminfo

" 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

" REDIR_TEST_TO_NULL has a very permissive SwapExists autocommand which is for
Expand Down
3 changes: 2 additions & 1 deletion src/testdir/test_textprop.vim
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,8 @@ endfunc

" screenshot test with textprop highlighting
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
endif
call writefile([
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
970,
/**/
969,
/**/
Expand Down

0 comments on commit ed79d1e

Please sign in to comment.