Mercurial > vim
comparison src/testdir/test_increment.vim @ 24725:3cdbce5ba73f v8.2.2901
patch 8.2.2901: some operators not fully tested
Commit: https://github.com/vim/vim/commit/3e72dcad8b752a42b6eaf71213e3f5d534175256
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 29 16:30:12 2021 +0200
patch 8.2.2901: some operators not fully tested
Problem: Some operators not fully tested.
Solution: Add a few test cases. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/8282)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 29 May 2021 16:45:03 +0200 |
parents | b545334ae654 |
children | dbec60b8c253 |
comparison
equal
deleted
inserted
replaced
24724:ed8e9ed43676 | 24725:3cdbce5ba73f |
---|---|
874 call assert_equal([0, 1, 3, 29], getpos('.')) | 874 call assert_equal([0, 1, 3, 29], getpos('.')) |
875 | 875 |
876 set virtualedit& | 876 set virtualedit& |
877 endfunc | 877 endfunc |
878 | 878 |
879 " Test for incrementing a signed hexadecimal and octal number | |
880 func Test_normal_increment_signed_hexoct_nr() | |
881 new | |
882 " negative sign before a hex number should be ignored | |
883 call setline(1, ["-0x9"]) | |
884 exe "norm \<C-A>" | |
885 call assert_equal(["-0xa"], getline(1, '$')) | |
886 exe "norm \<C-X>" | |
887 call assert_equal(["-0x9"], getline(1, '$')) | |
888 call setline(1, ["-007"]) | |
889 exe "norm \<C-A>" | |
890 call assert_equal(["-010"], getline(1, '$')) | |
891 exe "norm \<C-X>" | |
892 call assert_equal(["-007"], getline(1, '$')) | |
893 bw! | |
894 endfunc | |
895 | |
879 " vim: shiftwidth=2 sts=2 expandtab | 896 " vim: shiftwidth=2 sts=2 expandtab |