summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_digraph.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-07-21 10:11:03 +0200
committerBram Moolenaar <Bram@vim.org>2016-07-21 10:11:03 +0200
commitdfd63e30d13fff5603416b6c7e247cebeb003eb0 (patch)
tree35c5e6c3695499467842187e68c4ebd415fb19f6 /src/testdir/test_digraph.vim
parent60084333816c585d5858bc085b2942f813102ae3 (diff)
patch 7.4.2085v7.4.2085
Problem: Digraph tests fails on some systems. Solution: Run it separately and set 'encoding' early.
Diffstat (limited to 'src/testdir/test_digraph.vim')
-rw-r--r--src/testdir/test_digraph.vim10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/testdir/test_digraph.vim b/src/testdir/test_digraph.vim
index b12e19fa7c..60ae1fd3f4 100644
--- a/src/testdir/test_digraph.vim
+++ b/src/testdir/test_digraph.vim
@@ -4,6 +4,7 @@ if !has("digraphs") || !has("multi_byte")
finish
endif
+set enc=utf-8
scriptencoding utf-8
func! Put_Dig(chars)
@@ -15,8 +16,6 @@ func! Put_Dig_BS(char1, char2)
endfu
func! Test_digraphs()
- let _enc = &enc
- set enc=utf8
new
call Put_Dig("00")
call assert_equal("∞", getline('.'))
@@ -215,16 +214,13 @@ func! Test_digraphs()
call Put_Dig("00")
call Put_Dig("el")
call assert_equal(['␀', 'ü', '∞', 'l'], getline(line('.')-3,line('.')))
- " reset encoding option
- let &enc = _enc
bw!
endfunc
func! Test_digraphs_option()
- let _enc=&enc
" reset whichwrap option, so that testing <esc><bs>A works,
" without moving up a line
- set enc=utf8 digraph ww=
+ set digraph ww=
new
call Put_Dig_BS("0","0")
call assert_equal("∞", getline('.'))
@@ -423,8 +419,6 @@ func! Test_digraphs_option()
call Put_Dig_BS("0","0")
call Put_Dig_BS("e","l")
call assert_equal(['␀', 'ü', '∞', 'l'], getline(line('.')-3,line('.')))
- " reset encoding option
- let &enc = _enc
set nodigraph ww&vim
bw!
endfunc