mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
encoding: Update handling of encoding in tests
Always run tests with encoding=utf-8, regardless of user locale Don't set &encoding after startup in tests Helped-By: Michael Reed <m.reed@mykolab.com>
This commit is contained in:
@@ -4,7 +4,6 @@ STARTTEST
|
||||
:so small.vim
|
||||
:" Also test a BOM is ignored.
|
||||
:so mbyte.vim
|
||||
:set encoding=utf-8
|
||||
:7/start of errorfile/,/end of errorfile/w! Xerrorfile1
|
||||
:7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2
|
||||
:/start of testfile/,/end of testfile/w! Xtestfile
|
||||
|
@@ -5,8 +5,6 @@ And test "U" in Visual mode, also on German sharp S.
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
:so mbyte.vim
|
||||
:" This only works when 'encoding' is "latin1", don't depend on the environment
|
||||
:set enc=latin1
|
||||
/^abcde
|
||||
:" Test shift-right of a block
|
||||
jlllljj>wlljlll>
|
||||
@@ -39,18 +37,18 @@ G$khhhhhkkcmno
|
||||
:exe ":norm! l\<C-V>j$hhAab\<Esc>"
|
||||
:.,/^$/w >> test.out
|
||||
:" Test for Visual block insert when virtualedit=all and utf-8 encoding
|
||||
:set ve=all enc=utf-8
|
||||
:set ve=all
|
||||
:/\t\tline
|
||||
:exe ":norm! 07l\<C-V>jjIx\<Esc>"
|
||||
:.,/^$/w >> test.out
|
||||
:" Test for Visual block append when virtualedit=all
|
||||
:exe ":norm! 012l\<C-v>jjAx\<Esc>"
|
||||
:set ve= enc=latin1
|
||||
:set ve=
|
||||
:.,/^$/w >> test.out
|
||||
:" gUe must uppercase a whole word, also when <EFBFBD> changes to SS
|
||||
Gothe youtu<EFBFBD>euu endYpk0wgUe
|
||||
:" gUe must uppercase a whole word, also when ß changes to SS
|
||||
Gothe youtußeuu endYpk0wgUe
|
||||
:" gUfx must uppercase until x, inclusive.
|
||||
O- you<EFBFBD>tu<EFBFBD>exu -0fogUfx
|
||||
O- youßtußexu -0fogUfx
|
||||
:" VU must uppercase a whole line
|
||||
YpkVU
|
||||
:" same, when it's the last line in the buffer
|
||||
@@ -89,7 +87,7 @@ cccc
|
||||
cccc
|
||||
dddd
|
||||
|
||||
yaaa
|
||||
yaaa
|
||||
¿¿¿
|
||||
bbb
|
||||
|
||||
|
Binary file not shown.
@@ -5,7 +5,6 @@ Also test byteidx() and byteidxcomp()
|
||||
|
||||
STARTTEST
|
||||
:so mbyte.vim
|
||||
:set encoding=utf-8
|
||||
ENDTEST
|
||||
|
||||
Results of test69:
|
||||
|
@@ -2,7 +2,6 @@ Tests for tag search with !_TAG_FILE_ENCODING.
|
||||
|
||||
STARTTEST
|
||||
:so mbyte.vim
|
||||
:set enc=utf8
|
||||
:if !has('iconv') || iconv("\x82\x60", "cp932", "utf-8") != "\uff21"
|
||||
: e! test.ok
|
||||
: w! test.out
|
||||
|
@@ -4,7 +4,6 @@ Note: system clipboard is saved, changed and restored.
|
||||
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
:set encoding=latin1
|
||||
:set noswapfile
|
||||
:lang C
|
||||
:fun AppendRegContents(reg)
|
||||
|
@@ -1,3 +1,6 @@
|
||||
" Settings for test script execution
|
||||
" Always use "sh", don't use the value of "$SHELL".
|
||||
set shell=sh
|
||||
|
||||
" Don't depend on system locale, always use utf-8
|
||||
set encoding=utf-8
|
||||
|
Reference in New Issue
Block a user