From 2aafaa59928e17fd7858a89d203e2b2a07707601 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 4 Nov 2022 20:41:53 +0800 Subject: 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 --- src/nvim/testdir/test_increment.vim | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/nvim/testdir/test_increment.vim') 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 \" + call assert_equal(["-0xa"], getline(1, '$')) + exe "norm \" + call assert_equal(["-0x9"], getline(1, '$')) + call setline(1, ["-007"]) + exe "norm \" + call assert_equal(["-010"], getline(1, '$')) + exe "norm \" + call assert_equal(["-007"], getline(1, '$')) + bw! +endfunc + " vim: shiftwidth=2 sts=2 expandtab -- cgit