aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_increment.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-04 20:41:53 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-04 20:54:50 +0800
commit2aafaa59928e17fd7858a89d203e2b2a07707601 (patch)
tree30ee4255289a1c3be9a7a80ab06242ec91908406 /src/nvim/testdir/test_increment.vim
parent26a9f786c41bc8fa383e3ffe55a1fe77b50fb320 (diff)
downloadrneovim-2aafaa59928e17fd7858a89d203e2b2a07707601.tar.gz
rneovim-2aafaa59928e17fd7858a89d203e2b2a07707601.tar.bz2
rneovim-2aafaa59928e17fd7858a89d203e2b2a07707601.zip
vim-patch:8.2.2901: some operators not fully tested
Problem: Some operators not fully tested. Solution: Add a few test cases. (Yegappan Lakshmanan, closes vim/vim#8282) https://github.com/vim/vim/commit/3e72dcad8b752a42b6eaf71213e3f5d534175256
Diffstat (limited to 'src/nvim/testdir/test_increment.vim')
-rw-r--r--src/nvim/testdir/test_increment.vim17
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