blob: e1b663293eaffc67357bfe5b069c9442119e42be [file] [log] [blame]
Bram Moolenaard388d2a2016-06-26 16:24:20 +02001" Tests for using Ctrl-A/Ctrl-X using DBCS.
2if !has('multi_byte')
3 finish
4endif
5set encoding=cp932
6scriptencoding cp932
7
8func SetUp()
9 new
10 set nrformats&
11endfunc
12
13func TearDown()
14 bwipe!
15endfunc
16
17func Test_increment_dbcs_1()
18 set nrformats+=alpha
19 call setline(1, ["ŽR1"])
20 exec "norm! 0\<C-A>"
21 call assert_equal(["ŽR2"], getline(1, '$'))
22 call assert_equal([0, 1, 3, 0], getpos('.'))
23
24 call setline(1, ["‚`‚a‚b0xDE‚e"])
25 exec "norm! 0\<C-X>"
26 call assert_equal(["‚`‚a‚b0xDD‚e"], getline(1, '$'))
27 call assert_equal([0, 1, 10, 0], getpos('.'))
28endfunc
29
30" vim: shiftwidth=2 expandtab