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