On Mi, 20 Jul 2016, Bram Moolenaar wrote:

> 
> Christian Brabandt wrote:
> 
> > On Mi, 20 Jul 2016, Bram Moolenaar wrote:
> > 
> > > Patch 7.4.2084
> > > Problem:    New digraph test makes testing hang.
> > > Solution:   Don't set "nocp".
> > 
> > How did you know that?
> 
> Guessing :-).  I could not reproduce locally, but this was the
> suspicious part.  And it appears it did fix it.  The huge clang build
> did take long though.
> 
> Looks like the test increased coverage to 38%.  One simple way to

Yes, however, before that patch, the overall coverage was something like 
64.96% now it is back at 64.51%. I don't understand that.

> increase it: Execute :digraphs.  Using execute() you can do a bit
> of checking on the output.

Yeah, I also thought so. And also check, that the 'keymap' option works.
And check digraphs for commandline mode.

Attached is an update. Also available here:
https://github.com/chrisbra/vim-mq-patches/blob/master/0001-Some-more-digraph-tests.patch

Best,
Christian
-- 
Alle Menschen sind Brüder - aber das waren schließlich auch Kain und
Abel.
                -- Hans Kasper

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
From 3b328872fb9b182040549b90b1c3b78c9331d17c Mon Sep 17 00:00:00 2001
From: Christian Brabandt <[email protected]>
Date: Wed, 20 Jul 2016 23:52:12 +0200
Subject: [PATCH] Some more digraph tests

---
 src/testdir/test_digraph.vim | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/src/testdir/test_digraph.vim b/src/testdir/test_digraph.vim
index b12e19f..f32a0a3 100644
--- a/src/testdir/test_digraph.vim
+++ b/src/testdir/test_digraph.vim
@@ -429,4 +429,45 @@ func! Test_digraphs_option()
   bw!
 endfunc
 
+func! Test_digraphs_output()
+  let _enc=&enc
+  set enc=utf8
+  new
+  let c=execute(':digraph')
+  call assert_equal('Eu €  8364',  matchstr(c, '\C\<Eu\D*8364\>'))
+  call assert_equal('=e €  8364',  matchstr(c, '\C=e\D*8364\>'))
+  call assert_equal('=R ₽  8381',  matchstr(c, '\C=R\D*8381\>'))
+  call assert_equal('=P ₽  8381',  matchstr(c, '\C=P\D*8381\>'))
+  call assert_equal('o: ö  246',   matchstr(c, '\C\<o:\D*246\>'))
+  call assert_equal('v4 ㄪ 12586', matchstr(c, '\C\<v4\D*12586\>'))
+  call assert_equal("'0 ˚  730",   matchstr(c, '\C''0\D*730\>'))
+  call assert_equal('Z% Ж  1046',  matchstr(c, '\C\<Z%\D*1046\>'))
+  call assert_equal('u- ū  363',   matchstr(c, '\C\<u-\D*363\>'))
+  call assert_equal('SH ^A   1',   matchstr(c, '\C\<SH\D*1\>'))
+  " reset encoding option
+  let &enc = _enc
+  bw!
+endfunc
+
+func! Test_loadkeymap()
+  let _enc=&enc
+  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=
+  let &enc = _enc
+  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
-- 
2.1.4

Raspunde prin e-mail lui