aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlonerover <pathfinder1644@yahoo.com>2017-01-04 12:52:04 +0800
committerJames McCoy <jamessan@jamessan.com>2017-02-09 22:14:04 -0500
commit1861f12a5fe2efd4c1747b1870d7d0740fef55f5 (patch)
tree7c3a0a36d787bbc50ce7f0e13b62792e8312a58c /src
parentbec7e47938e203a0dd49920f328134fa943d6733 (diff)
downloadrneovim-1861f12a5fe2efd4c1747b1870d7d0740fef55f5.tar.gz
rneovim-1861f12a5fe2efd4c1747b1870d7d0740fef55f5.tar.bz2
rneovim-1861f12a5fe2efd4c1747b1870d7d0740fef55f5.zip
vim-patch:7.4.2087
Problem: Digraph code test coverage is still low. Solution: Add more tests. (Christian Brabandt) https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/test_digraph.vim35
-rw-r--r--src/nvim/version.c2
2 files changed, 36 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_digraph.vim b/src/nvim/testdir/test_digraph.vim
index 12cda4d461..2840229007 100644
--- a/src/nvim/testdir/test_digraph.vim
+++ b/src/nvim/testdir/test_digraph.vim
@@ -420,4 +420,39 @@ func! Test_digraphs_option()
bw!
endfunc
+func! Test_digraphs_output()
+ new
+ let out = execute(':digraph')
+ call assert_equal('Eu € 8364', matchstr(out, '\C\<Eu\D*8364\>'))
+ call assert_equal('=e € 8364', matchstr(out, '\C=e\D*8364\>'))
+ call assert_equal('=R ₽ 8381', matchstr(out, '\C=R\D*8381\>'))
+ call assert_equal('=P ₽ 8381', matchstr(out, '\C=P\D*8381\>'))
+ call assert_equal('o: ö 246', matchstr(out, '\C\<o:\D*246\>'))
+ call assert_equal('v4 ㄪ 12586', matchstr(out, '\C\<v4\D*12586\>'))
+ call assert_equal("'0 ˚ 730", matchstr(out, '\C''0\D*730\>'))
+ call assert_equal('Z% Ж 1046', matchstr(out, '\C\<Z%\D*1046\>'))
+ call assert_equal('u- ū 363', matchstr(out, '\C\<u-\D*363\>'))
+ call assert_equal('SH ^A 1', matchstr(out, '\C\<SH\D*1\>'))
+ bw!
+endfunc
+
+func! Test_loadkeymap()
+ new
+ set keymap=czech
+ set iminsert=0
+ call feedkeys("o|\<c-^>|01234567890|\<esc>", 'tx')
+ call assert_equal("|'é+ěščřžýáíé'", getline('.'))
+ " reset keymap and encoding option
+ set keymap=
+ bw!
+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)
+endfunc
+
" vim: tabstop=2 shiftwidth=0 sts=-1 expandtab
diff --git a/src/nvim/version.c b/src/nvim/version.c
index aab57e5765..d8292a9aae 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -353,7 +353,7 @@ static int included_patches[] = {
// 2090,
// 2089 NA
// 2088,
- // 2087,
+ 2087,
2086,
2085,
2084,