diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-11-04 20:41:53 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-11-04 20:54:50 +0800 |
| commit | 2aafaa59928e17fd7858a89d203e2b2a07707601 (patch) | |
| tree | 30ee4255289a1c3be9a7a80ab06242ec91908406 /src/nvim/testdir/test_normal.vim | |
| parent | 26a9f786c41bc8fa383e3ffe55a1fe77b50fb320 (diff) | |
| download | rneovim-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_normal.vim')
| -rw-r--r-- | src/nvim/testdir/test_normal.vim | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_normal.vim b/src/nvim/testdir/test_normal.vim index 6804d549c6..5fc670e422 100644 --- a/src/nvim/testdir/test_normal.vim +++ b/src/nvim/testdir/test_normal.vim @@ -2125,6 +2125,16 @@ func Test_normal30_changecase() call assert_equal(['aaaaaa', 'AAAAaa'], getline(1, 2)) set whichwrap& + " try changing the case with a double byte encoding (DBCS) + %bw! + let enc = &enc + " set encoding=cp932 + call setline(1, "\u8470") + normal ~ + normal gU$gu$gUgUg~g~gugu + call assert_equal("\u8470", getline(1)) + let &encoding = enc + " clean up bw! endfunc @@ -3499,6 +3509,27 @@ func Test_normal_percent_jump() close! endfunc +" Test for << and >> commands to shift text by 'shiftwidth' +func Test_normal_shift_rightleft() + new + call setline(1, ['one', '', "\t", ' two', "\tthree", ' four']) + set shiftwidth=2 tabstop=8 + normal gg6>> + call assert_equal([' one', '', "\t ", ' two', "\t three", "\tfour"], + \ getline(1, '$')) + normal ggVG2>> + call assert_equal([' one', '', "\t ", "\ttwo", + \ "\t three", "\t four"], getline(1, '$')) + normal gg6<< + call assert_equal([' one', '', "\t ", ' two', "\t three", + \ "\t four"], getline(1, '$')) + normal ggVG2<< + call assert_equal(['one', '', "\t", ' two', "\tthree", ' four'], + \ getline(1, '$')) + set shiftwidth& tabstop& + bw! +endfunc + " Some commands like yy, cc, dd, >>, << and !! accept a count after " typing the first letter of the command. func Test_normal_count_after_operator() |