summaryrefslogtreecommitdiffstats
path: root/src/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-31 11:37:20 +0100
committerBram Moolenaar <Bram@vim.org>2022-07-31 11:37:20 +0100
commit750209459c9e54030409afe8f4ad59570600b5c4 (patch)
tree283538c45603d0ea62c1800eb67a49f8b6f66eef /src/testdir
parent3a4cd39d476474e20e88ebf120ca6070cc0d0072 (diff)
patch 9.0.0118: no test for what patch 9.0.0155 fixesv9.0.0118
Problem: No test for what patch 9.0.0155 fixes. Solution: Add a test. Fix typos. (closes #10822)
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_ins_complete.vim2
-rw-r--r--src/testdir/test_messages.vim17
2 files changed, 14 insertions, 5 deletions
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim
index 2b0a2947a0..a3d2b8f28a 100644
--- a/src/testdir/test_ins_complete.vim
+++ b/src/testdir/test_ins_complete.vim
@@ -397,7 +397,7 @@ func Test_CompleteDone_modify()
\ 'user_data': '',
\ }
let v:completed_item = value
- call assert_equal(v:completed_item, value)
+ call assert_equal(value, v:completed_item)
endfunc
func CompleteTest(findstart, query)
diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim
index ea5aee1c50..1f1bb9b268 100644
--- a/src/testdir/test_messages.vim
+++ b/src/testdir/test_messages.vim
@@ -409,14 +409,14 @@ func Test_cmdheight_zero()
" Check change/restore cmdheight when macro
call feedkeys("qa", "xt")
- call assert_equal(&cmdheight, 1)
+ call assert_equal(1, &cmdheight)
call feedkeys("q", "xt")
- call assert_equal(&cmdheight, 0)
+ call assert_equal(0, &cmdheight)
call setline(1, 'somestring')
call feedkeys("y", "n")
%s/somestring/otherstring/gc
- call assert_equal(getline(1), 'otherstring')
+ call assert_equal('otherstring', getline(1))
call feedkeys("g\<C-g>", "xt")
call assert_match(
@@ -428,7 +428,16 @@ func Test_cmdheight_zero()
split
endfor
only
- call assert_equal(&cmdheight, 0)
+ call assert_equal(0, &cmdheight)
+
+ " Check that pressing ":" should not scroll a window
+ " Check for what patch 9.0.0115 fixes
+ botright 10new
+ call setline(1, range(12))
+ 7
+ call feedkeys(":\"\<C-R>=line('w0')\<CR>\<CR>", "xt")
+ call assert_equal('"1', @:)
+ bwipe!
set cmdheight&
set showcmd&