summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-22 14:38:58 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-22 14:38:58 +0100
commited79d1e348c40e2432802423bf22e4f7b536bf8a (patch)
tree07ba2127daae7f89591168d7cc4589fc8fd76901
parent97c2c05ead689f4a5de986c82531fcbd09295cda (diff)
downloadvim-git-ed79d1e348c40e2432802423bf22e4f7b536bf8a.tar.gz
patch 8.1.0970: text properties test fails when 'encoding' is not utf-8v8.1.0970
Problem: Text properties test fails when 'encoding' is not utf-8. Solution: Compare with original value of 'encoding'. (Christian Brabandt, closes #3986)
-rw-r--r--src/testdir/runtest.vim4
-rw-r--r--src/testdir/test_textprop.vim3
-rw-r--r--src/version.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index 9108b8e68..2a1b5ea5c 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -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
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 311f30fbf..5ea551750 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -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([
diff --git a/src/version.c b/src/version.c
index cd45fa018..c4034ee29 100644
--- a/src/version.c
+++ b/src/version.c
@@ -780,6 +780,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 970,
+/**/
969,
/**/
968,