vim-patch:7.4.2085

Problem:    Digraph tests fails on some systems.
Solution:   Run it separately and set 'encoding' early.

dfd63e30d1
This commit is contained in:
lonerover
2017-01-04 12:27:42 +08:00
committed by James McCoy
parent 775dfc6000
commit 6f4a963e0e
4 changed files with 4 additions and 10 deletions

View File

@@ -31,6 +31,7 @@ NEW_TESTS = \
test_bufwintabinfo.res \ test_bufwintabinfo.res \
test_cmdline.res \ test_cmdline.res \
test_cscope.res \ test_cscope.res \
test_digraph.res \
test_diffmode.res \ test_diffmode.res \
test_gn.res \ test_gn.res \
test_hardcopy.res \ test_hardcopy.res \

View File

@@ -4,7 +4,6 @@
source test_assign.vim source test_assign.vim
source test_autocmd.vim source test_autocmd.vim
source test_cursor_func.vim source test_cursor_func.vim
source test_digraph.vim
source test_execute_func.vim source test_execute_func.vim
source test_ex_undo.vim source test_ex_undo.vim
source test_expr.vim source test_expr.vim

View File

@@ -4,6 +4,7 @@ if !has("digraphs") || !has("multi_byte")
finish finish
endif endif
set enc=utf-8
scriptencoding utf-8 scriptencoding utf-8
func! Put_Dig(chars) func! Put_Dig(chars)
@@ -15,8 +16,6 @@ func! Put_Dig_BS(char1, char2)
endfu endfu
func! Test_digraphs() func! Test_digraphs()
let _enc = &enc
set enc=utf8
new new
call Put_Dig("00") call Put_Dig("00")
call assert_equal("∞", getline('.')) call assert_equal("∞", getline('.'))
@@ -215,16 +214,13 @@ func! Test_digraphs()
call Put_Dig("00") call Put_Dig("00")
call Put_Dig("el") call Put_Dig("el")
call assert_equal(['␀', 'ü', '∞', 'l'], getline(line('.')-3,line('.'))) call assert_equal(['␀', 'ü', '∞', 'l'], getline(line('.')-3,line('.')))
" reset encoding option
let &enc = _enc
bw! bw!
endfunc endfunc
func! Test_digraphs_option() func! Test_digraphs_option()
let _enc=&enc
" reset whichwrap option, so that testing <esc><bs>A works, " reset whichwrap option, so that testing <esc><bs>A works,
" without moving up a line " without moving up a line
set enc=utf8 digraph ww= set digraph ww=
new new
call Put_Dig_BS("0","0") call Put_Dig_BS("0","0")
call assert_equal("∞", getline('.')) call assert_equal("∞", getline('.'))
@@ -423,8 +419,6 @@ func! Test_digraphs_option()
call Put_Dig_BS("0","0") call Put_Dig_BS("0","0")
call Put_Dig_BS("e","l") call Put_Dig_BS("e","l")
call assert_equal(['␀', 'ü', '∞', 'l'], getline(line('.')-3,line('.'))) call assert_equal(['␀', 'ü', '∞', 'l'], getline(line('.')-3,line('.')))
" reset encoding option
let &enc = _enc
set nodigraph ww&vim set nodigraph ww&vim
bw! bw!
endfunc endfunc

View File

@@ -355,7 +355,7 @@ static int included_patches[] = {
// 2088, // 2088,
// 2087, // 2087,
2086, 2086,
// 2085, 2085,
2084, 2084,
// 2083, // 2083,
2082, 2082,