mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
vim-patch:7.4.1954
Problem: No test for what 7.4.1948 fixes.
Solution: Add a test. (Hirohito Higashi, closes vim/vim#880)
d388d2ac8b
Some adjustments had to be made from upstream since nvim always uses
utf-8 internally.
* Removed the 'set encoding=cp932' line from the test
* Adjusted the expected values for getpos(), since the number of bytes
is different in utf-8
This commit is contained in:
parent
91efe96b96
commit
3677189bfc
@ -37,6 +37,7 @@ NEW_TESTS = \
|
||||
test_hardcopy.res \
|
||||
test_help_tagjump.res \
|
||||
test_history.res \
|
||||
test_increment_dbcs.res \
|
||||
test_langmap.res \
|
||||
test_match.res \
|
||||
test_matchadd_conceal.res \
|
||||
|
29
src/nvim/testdir/test_increment_dbcs.vim
Normal file
29
src/nvim/testdir/test_increment_dbcs.vim
Normal file
@ -0,0 +1,29 @@
|
||||
" Tests for using Ctrl-A/Ctrl-X using DBCS.
|
||||
if !has('multi_byte')
|
||||
finish
|
||||
endif
|
||||
scriptencoding cp932
|
||||
|
||||
func SetUp()
|
||||
new
|
||||
set nrformats&
|
||||
endfunc
|
||||
|
||||
func TearDown()
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func Test_increment_dbcs_1()
|
||||
set nrformats+=alpha
|
||||
call setline(1, ["ŽR1"])
|
||||
exec "norm! 0\<C-A>"
|
||||
call assert_equal(["ŽR2"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 4, 0], getpos('.'))
|
||||
|
||||
call setline(1, ["‚`‚a‚b0xDE‚e"])
|
||||
exec "norm! 0\<C-X>"
|
||||
call assert_equal(["‚`‚a‚b0xDD‚e"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 13, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 expandtab
|
@ -486,7 +486,7 @@ static int included_patches[] = {
|
||||
// 1957 NA
|
||||
1956,
|
||||
// 1955 NA
|
||||
// 1954,
|
||||
1954,
|
||||
1953,
|
||||
1952,
|
||||
// 1951 NA
|
||||
|
Loading…
Reference in New Issue
Block a user