Mercurial > vim
annotate src/testdir/test_increment_dbcs.vim @ 24760:ca0f983f08cf v8.2.2918
patch 8.2.2918: builtin function can be shadowed by global variable
Commit: https://github.com/vim/vim/commit/3d9c4eefe656ee8bf58c0496a48bd56bac180056
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon May 31 22:15:26 2021 +0200
patch 8.2.2918: builtin function can be shadowed by global variable
Problem: Builtin function can be shadowed by global variable.
Solution: Check for builtin function before variable. (Yasuhiro Matsumoto,
closes #8302)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 31 May 2021 22:30:02 +0200 |
parents | 08940efa6b4e |
children |
rev | line source |
---|---|
9345
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Tests for using Ctrl-A/Ctrl-X using DBCS. |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
15607
diff
changeset
|
2 |
9345
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 set encoding=cp932 |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 scriptencoding cp932 |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 func SetUp() |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 new |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 set nrformats& |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 endfunc |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 func TearDown() |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 bwipe! |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 endfunc |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 func Test_increment_dbcs_1() |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 set nrformats+=alpha |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 call setline(1, ["ŽR1"]) |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 exec "norm! 0\<C-A>" |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 call assert_equal(["ŽR2"], getline(1, '$')) |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 call assert_equal([0, 1, 3, 0], getpos('.')) |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 call setline(1, ["‚`‚a‚b0xDE‚e"]) |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 exec "norm! 0\<C-X>" |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 call assert_equal(["‚`‚a‚b0xDD‚e"], getline(1, '$')) |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 call assert_equal([0, 1, 10, 0], getpos('.')) |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 endfunc |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 |
9909
3ee84d270ea7
commit https://github.com/vim/vim/commit/9e4d8215d386100ab660d7d11e6620fd148b605e
Christian Brabandt <cb@256bit.org>
parents:
9345
diff
changeset
|
28 " vim: shiftwidth=2 sts=2 expandtab |