robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
af23d17388
master
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. 4if ! has ( 'iconv' ) 5finish 6endif 7scriptencoding cp932 8 9func SetUp () 10new 11set nrformats & 12endfunc 13 14func TearDown () 15bwipe ! 16endfunc 17 18func Test_increment_dbcs_1 () 19set nrformats += alpha 20call setline ( 1 , [ "�R1" ]) 21exec "norm! 0\<C-A>" 22call assert_equal ([ "�R2" ], getline ( 1 , '$' )) 23call assert_equal ([ 0 , 1 , 4 , 0 ], getpos ( '.' )) 24 25call setline ( 1 , [ "�`�a�b0xDE�e" ]) 26exec "norm! 0\<C-X>" 27call assert_equal ([ "�`�a�b0xDD�e" ], getline ( 1 , '$' )) 28call assert_equal ([ 0 , 1 , 13 , 0 ], getpos ( '.' )) 29endfunc 30 31" vim: shiftwidth=2 sts=2 expandtab