diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-11-04 21:49:43 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-04 21:49:43 +0800 |
| commit | 234b8c5f3d57294dda06dbc6c1760e5983bd2c19 (patch) | |
| tree | 30ee4255289a1c3be9a7a80ab06242ec91908406 /src/nvim/testdir/test_increment.vim | |
| parent | 0aba1761714661b8576d4676c61c319e76bfac1b (diff) | |
| parent | 2aafaa59928e17fd7858a89d203e2b2a07707601 (diff) | |
| download | rneovim-234b8c5f3d57294dda06dbc6c1760e5983bd2c19.tar.gz rneovim-234b8c5f3d57294dda06dbc6c1760e5983bd2c19.tar.bz2 rneovim-234b8c5f3d57294dda06dbc6c1760e5983bd2c19.zip | |
Merge pull request #20934 from zeertzjq/vim-8.2.0968
vim-patch:8.2.{0968,0976,1022,1810,2901}: various tests
Diffstat (limited to 'src/nvim/testdir/test_increment.vim')
| -rw-r--r-- | src/nvim/testdir/test_increment.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_increment.vim b/src/nvim/testdir/test_increment.vim index 52355d86fb..3c2b88ef9f 100644 --- a/src/nvim/testdir/test_increment.vim +++ b/src/nvim/testdir/test_increment.vim @@ -877,4 +877,21 @@ func Test_normal_increment_with_virtualedit() set virtualedit& endfunc +" Test for incrementing a signed hexadecimal and octal number +func Test_normal_increment_signed_hexoct_nr() + new + " negative sign before a hex number should be ignored + call setline(1, ["-0x9"]) + exe "norm \<C-A>" + call assert_equal(["-0xa"], getline(1, '$')) + exe "norm \<C-X>" + call assert_equal(["-0x9"], getline(1, '$')) + call setline(1, ["-007"]) + exe "norm \<C-A>" + call assert_equal(["-010"], getline(1, '$')) + exe "norm \<C-X>" + call assert_equal(["-007"], getline(1, '$')) + bw! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |