diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-21 21:23:38 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-21 21:23:38 +0200 |
commit | e25bc5abb4621c6263b0248988a207d53b57fc54 (patch) | |
tree | 2850b36c91dd590e62231bfb3836e4f18be35ee9 | |
parent | ac105ed3c420660ddbddc501c97875c48220817e (diff) | |
download | vim-e25bc5abb4621c6263b0248988a207d53b57fc54.zip |
patch 7.4.2087
Problem: Digraph code test coverage is still low.
Solution: Add more tests. (Christian Brabandt)
-rw-r--r-- | src/testdir/test_digraph.vim | 35 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 37 insertions, 0 deletions
diff --git a/src/testdir/test_digraph.vim b/src/testdir/test_digraph.vim index 12cda4d46..284022900 100644 --- a/src/testdir/test_digraph.vim +++ b/src/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/version.c b/src/version.c index 9af59e55c..8f60ccd41 100644 --- a/src/version.c +++ b/src/version.c @@ -759,6 +759,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2087, +/**/ 2086, /**/ 2085, |