test_increment_dbcs.vim (670B)
1 " Tests for using Ctrl-A/Ctrl-X using DBCS. 2 " neovim needs an iconv to handle cp932. Please do not remove the following 3 " conditions. 4 if !has('iconv') 5 finish 6 endif 7 scriptencoding cp932 8 9 func SetUp() 10 new 11 set nrformats& 12 endfunc 13 14 func TearDown() 15 bwipe! 16 endfunc 17 18 func Test_increment_dbcs_1() 19 set nrformats+=alpha 20 call setline(1, ["�R1"]) 21 exec "norm! 0\<C-A>" 22 call assert_equal(["�R2"], getline(1, '$')) 23 call assert_equal([0, 1, 4, 0], getpos('.')) 24 25 call setline(1, ["�`�a�b0xDE�e"]) 26 exec "norm! 0\<C-X>" 27 call assert_equal(["�`�a�b0xDD�e"], getline(1, '$')) 28 call assert_equal([0, 1, 13, 0], getpos('.')) 29 endfunc 30 31 " vim: shiftwidth=2 sts=2 expandtab