Mercurial > vim
diff src/testdir/test_normal.vim @ 20832:045442aa392b v8.2.0968
patch 8.2.0968: no proper testing of the 'cpoptions' flags
Commit: https://github.com/vim/vim/commit/c9630d2658af9dcaa01913e899b201bfdef7b536
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 13 13:20:48 2020 +0200
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 https://github.com/vim/vim/issues/6251)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 13 Jun 2020 13:30:04 +0200 |
parents | aafedd368f40 |
children | d3fa0d29fa9a |
line wrap: on
line diff
--- a/src/testdir/test_normal.vim +++ b/src/testdir/test_normal.vim @@ -2531,20 +2531,6 @@ func Test_normal52_rl() bw! endfunc -func Test_normal53_digraph() - CheckFeature digraphs - new - call setline(1, 'abcdefgh|') - exe "norm! 1gg0f\<c-k>!!" - call assert_equal(9, col('.')) - set cpo+=D - exe "norm! 1gg0f\<c-k>!!" - call assert_equal(1, col('.')) - - set cpo-=D - bw! -endfunc - func Test_normal54_Ctrl_bsl() new call setline(1, 'abcdefghijklmn') @@ -2866,44 +2852,6 @@ func Test_normal_gk_gj() set cpoptions& number& numberwidth& wrap& endfunc -" Test for cursor movement with '-' in 'cpoptions' -func Test_normal_cpo_minus() - 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() - new - let g:Line = '' - func SaveFirstLine() - let g:Line = Screenline(1) - return '' - endfunc - inoremap <expr> <buffer> <F2> SaveFirstLine() - call test_override('redraw_flag', 1) - set cpo+=$ - call setline(1, 'one two three') - redraw! - exe "normal c2w\<F2>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 @@ -2985,31 +2933,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\<C-A>"') - call assert_beeps('exe "normal v\<C-X>"') - set cpo-=E - close! -endfunc - " Test for 'w' and 'b' commands func Test_normal_word_move() new