diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-05-29 16:30:12 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-05-29 16:30:12 +0200 |
commit | 3e72dcad8b752a42b6eaf71213e3f5d534175256 (patch) | |
tree | 078ea4eea29f9d3bd3473ce7ccd978976826ddd7 /src/testdir/test_increment.vim | |
parent | 1174b018a6d705ddb8c04f3d21f78ae760aa0856 (diff) | |
download | vim-git-3e72dcad8b752a42b6eaf71213e3f5d534175256.tar.gz |
patch 8.2.2901: some operators not fully testedv8.2.2901
Problem: Some operators not fully tested.
Solution: Add a few test cases. (Yegappan Lakshmanan, closes #8282)
Diffstat (limited to 'src/testdir/test_increment.vim')
-rw-r--r-- | src/testdir/test_increment.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/testdir/test_increment.vim b/src/testdir/test_increment.vim index 1a631ec00..beacb0a44 100644 --- a/src/testdir/test_increment.vim +++ b/src/testdir/test_increment.vim @@ -876,4 +876,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 |