aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_digraph.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-23 21:37:08 -0500
committerGitHub <noreply@github.com>2020-12-23 21:37:08 -0500
commit7afd4526f2ee018ef611f91bfe1b0cb8ed2fc4c6 (patch)
treeac13e40f4dea01690c95d3bf2a01b9f9d7795279 /src/nvim/testdir/test_digraph.vim
parent6eecd4230d30014e24d3a9f62b4d6b89d74d6b1a (diff)
parente193dbd7e88b6eb5dd4effc4c604d62964e1883d (diff)
downloadrneovim-7afd4526f2ee018ef611f91bfe1b0cb8ed2fc4c6.tar.gz
rneovim-7afd4526f2ee018ef611f91bfe1b0cb8ed2fc4c6.tar.bz2
rneovim-7afd4526f2ee018ef611f91bfe1b0cb8ed2fc4c6.zip
Merge pull request #13591 from janlazo/vim-8.1.1805
vim-patch:8.1.1805,8.2.{116,1025}
Diffstat (limited to 'src/nvim/testdir/test_digraph.vim')
-rw-r--r--src/nvim/testdir/test_digraph.vim22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_digraph.vim b/src/nvim/testdir/test_digraph.vim
index 9eea27740d..b6d9687560 100644
--- a/src/nvim/testdir/test_digraph.vim
+++ b/src/nvim/testdir/test_digraph.vim
@@ -1,8 +1,8 @@
" Tests for digraphs
-if !has("digraphs")
- finish
-endif
+source check.vim
+CheckFeature digraphs
+source term_util.vim
func Put_Dig(chars)
exe "norm! o\<c-k>".a:chars
@@ -487,4 +487,20 @@ func Test_show_digraph_cp1251()
bwipe!
endfunc
+" Test for the characters displayed on the screen when entering a digraph
+func Test_entering_digraph()
+ CheckRunVimInTerminal
+ let buf = RunVimInTerminal('', {'rows': 6})
+ call term_sendkeys(buf, "i\<C-K>")
+ call term_wait(buf)
+ call assert_equal('?', term_getline(buf, 1))
+ call term_sendkeys(buf, "1")
+ call term_wait(buf)
+ call assert_equal('1', term_getline(buf, 1))
+ call term_sendkeys(buf, "2")
+ call term_wait(buf)
+ call assert_equal('½', term_getline(buf, 1))
+ call StopVimInTerminal(buf)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab