summaryrefslogtreecommitdiff
path: root/src/testdir/test_normal.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-03-30 19:32:53 +0200
committerBram Moolenaar <Bram@vim.org>2020-03-30 19:32:53 +0200
commitca68ae13114619df3e4c195b41ad0575516f5ff6 (patch)
tree9022b7f5f1c8bb1ab22660530244414e9b6cdd99 /src/testdir/test_normal.vim
parent7d333a900d260b8e8caa0fb159c85023fc8795bd (diff)
downloadvim-git-ca68ae13114619df3e4c195b41ad0575516f5ff6.tar.gz
patch 8.2.0482: channel and sandbox code not sufficiently testedv8.2.0482
Problem: Channel and sandbox code not sufficiently tested. Solution: Add more tests. (Yegappan Lakshmanan, closes #5855)
Diffstat (limited to 'src/testdir/test_normal.vim')
-rw-r--r--src/testdir/test_normal.vim23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index c2cbc3e1b..83a95f9f6 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -2,6 +2,7 @@
source shared.vim
source check.vim
+source view_util.vim
func Setup_NewWindow()
10new
@@ -2941,6 +2942,28 @@ func Test_normal_cpo_minus()
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