diff src/testdir/test_digraph.vim @ 19581:848dc460adf0 v8.2.0347

patch 8.2.0347: various code not covered by tests Commit: https://github.com/vim/vim/commit/91ffc8a5f5c7b1c6979b3352a12ed779d11173a9 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 2 20:54:22 2020 +0100 patch 8.2.0347: various code not covered by tests Problem: Various code not covered by tests. Solution: Add more test coverage. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5720)
author Bram Moolenaar <Bram@vim.org>
date Mon, 02 Mar 2020 21:00:04 +0100
parents 2ef19eed524a
children 2c4d9ca33769
line wrap: on
line diff
--- a/src/testdir/test_digraph.vim
+++ b/src/testdir/test_digraph.vim
@@ -451,10 +451,12 @@ endfunc
 
 func Test_digraph_cmndline()
   " Create digraph on commandline
-  " This is a hack, to let Vim create the digraph in commandline mode
-  let s = ''
-  exe "sil! norm! :let s.='\<c-k>Eu'\<cr>"
-  call assert_equal("€", s)
+  call feedkeys(":\"\<c-k>Eu\<cr>", 'xt')
+  call assert_equal('"€', @:)
+
+  " Canceling a CTRL-K on the cmdline
+  call feedkeys(":\"a\<c-k>\<esc>b\<cr>", 'xt')
+  call assert_equal('"ab', @:)
 endfunc
 
 func Test_show_digraph()