To: vim_dev@googlegroups.com Subject: Patch 7.4.2087 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2087 Problem: Digraph code test coverage is still low. Solution: Add more tests. (Christian Brabandt) Files: src/testdir/test_digraph.vim *** ../vim-7.4.2086/src/testdir/test_digraph.vim 2016-07-21 20:33:28.835262339 +0200 --- src/testdir/test_digraph.vim 2016-07-21 21:20:30.782134063 +0200 *************** *** 420,423 **** --- 420,458 ---- bw! endfunc + func! Test_digraphs_output() + new + let out = execute(':digraph') + call assert_equal('Eu € 8364', matchstr(out, '\C\')) + 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\')) + call assert_equal('v4 ㄪ 12586', matchstr(out, '\C\')) + call assert_equal("'0 ˚ 730", matchstr(out, '\C''0\D*730\>')) + call assert_equal('Z% Ж 1046', matchstr(out, '\C\')) + call assert_equal('u- ū 363', matchstr(out, '\C\')) + call assert_equal('SH ^A 1', matchstr(out, '\C\')) + bw! + endfunc + + func! Test_loadkeymap() + new + set keymap=czech + set iminsert=0 + call feedkeys("o|\|01234567890|\", '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.='\Eu'\" + call assert_equal("€", s) + endfunc + " vim: tabstop=2 shiftwidth=0 sts=-1 expandtab *** ../vim-7.4.2086/src/version.c 2016-07-21 20:33:28.835262339 +0200 --- src/version.c 2016-07-21 21:18:35.191332282 +0200 *************** *** 760,761 **** --- 760,763 ---- { /* Add new patch number below this line */ + /**/ + 2087, /**/ -- 5 out of 4 people have trouble with fractions. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///