From 32a2c556ab3697111f01c9ef50447ec5d78070f7 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 4 Nov 2022 19:42:10 +0800 Subject: vim-patch:8.2.0968: no proper testing of the 'cpoptions' flags Problem: No proper testing of the 'cpoptions' flags. Solution: Add tests. (Yegappan Lakshmanan, closes vim/vim#6251) https://github.com/vim/vim/commit/c9630d2658af9dcaa01913e899b201bfdef7b536 --- src/nvim/testdir/test_normal.vim | 79 ---------------------------------------- 1 file changed, 79 deletions(-) (limited to 'src/nvim/testdir/test_normal.vim') diff --git a/src/nvim/testdir/test_normal.vim b/src/nvim/testdir/test_normal.vim index 32bb755584..3c9a7a3986 100644 --- a/src/nvim/testdir/test_normal.vim +++ b/src/nvim/testdir/test_normal.vim @@ -2931,20 +2931,6 @@ func Test_normal52_rl() bw! endfunc -func Test_normal53_digraph() - CheckFeature digraphs - new - call setline(1, 'abcdefgh|') - exe "norm! 1gg0f\!!" - call assert_equal(9, col('.')) - set cpo+=D - exe "norm! 1gg0f\!!" - call assert_equal(1, col('.')) - - set cpo-=D - bw! -endfunc - func Test_normal54_Ctrl_bsl() new call setline(1, 'abcdefghijklmn') @@ -3265,46 +3251,6 @@ func Test_normal_gk_gj() set cpoptions& number& numberwidth& wrap& endfunc -" Test for cursor movement with '-' in 'cpoptions' -func Test_normal_cpo_minus() - throw 'Skipped: Nvim does not support cpoptions flag "-"' - new - call setline(1, ['foo', 'bar', 'baz']) - let save_cpo = &cpo - set cpo+=- - call assert_beeps('normal 10j') - call assert_equal(1, line('.')) - normal G - call assert_beeps('normal 10k') - call assert_equal(3, line('.')) - call assert_fails(10, 'E16:') - let &cpo = save_cpo - close! -endfunc - -" Test for displaying dollar when changing text ('$' flag in 'cpoptions') -func Test_normal_cpo_dollar() - throw 'Skipped: use test/functional/legacy/cpoptions_spec.lua' - new - let g:Line = '' - func SaveFirstLine() - let g:Line = Screenline(1) - return '' - endfunc - inoremap SaveFirstLine() - call test_override('redraw_flag', 1) - set cpo+=$ - call setline(1, 'one two three') - redraw! - exe "normal c2w\vim" - call assert_equal('one tw$ three', g:Line) - call assert_equal('vim three', getline(1)) - set cpo-=$ - call test_override('ALL', 0) - delfunc SaveFirstLine - %bw! -endfunc - " Test for using : to run a multi-line Ex command in operator pending mode func Test_normal_yank_with_excmd() new @@ -3387,31 +3333,6 @@ func Test_normal_delete_cmd() close! endfunc -" Test for the 'E' flag in 'cpo' with yank, change, delete, etc. operators -func Test_empty_region_error() - new - call setline(1, '') - set cpo+=E - " yank an empty line - call assert_beeps('normal "ayl') - " change an empty line - call assert_beeps('normal lcTa') - " delete an empty line - call assert_beeps('normal D') - call assert_beeps('normal dl') - call assert_equal('', getline(1)) - " change case of an empty line - call assert_beeps('normal gul') - call assert_beeps('normal gUl') - " replace a character - call assert_beeps('normal vrx') - " increment and decrement - call assert_beeps('exe "normal v\"') - call assert_beeps('exe "normal v\"') - set cpo-=E - close! -endfunc - " Test for deleting or changing characters across lines with 'whichwrap' " containing 's'. Should count as one character. func Test_normal_op_across_lines() -- cgit