comparison src/testdir/test_digraph.vim @ 20941:505d97ea54da v8.2.1022

patch 8.2.1022: various parts of code not covered by tests Commit: https://github.com/vim/vim/commit/845e0ee59430eac07e74b6cb92020e420d17953d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 20 16:05:32 2020 +0200 patch 8.2.1022: various parts of code not covered by tests Problem: Various parts of code not covered by tests. Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/6300)
author Bram Moolenaar <Bram@vim.org>
date Sat, 20 Jun 2020 16:15:04 +0200
parents 3601e816a569
children 1c71605f0c5d
comparison
equal deleted inserted replaced
20940:88ce5327f213 20941:505d97ea54da
1 " Tests for digraphs 1 " Tests for digraphs
2 2
3 source check.vim 3 source check.vim
4 CheckFeature digraphs 4 CheckFeature digraphs
5 source term_util.vim
5 6
6 func Put_Dig(chars) 7 func Put_Dig(chars)
7 exe "norm! o\<c-k>".a:chars 8 exe "norm! o\<c-k>".a:chars
8 endfu 9 endfu
9 10
500 call writefile(['loadkeymap', 'a'], 'Xkeymap') 501 call writefile(['loadkeymap', 'a'], 'Xkeymap')
501 call assert_fails('source Xkeymap', 'E791:') 502 call assert_fails('source Xkeymap', 'E791:')
502 call delete('Xkeymap') 503 call delete('Xkeymap')
503 endfunc 504 endfunc
504 505
506 " Test for the characters displayed one the screen when entering a digraph
507 func Test_entering_digraph()
508 CheckRunVimInTerminal
509 let buf = RunVimInTerminal('', {'rows': 6})
510 call term_sendkeys(buf, "i\<C-K>")
511 call term_wait(buf)
512 call assert_equal('?', term_getline(buf, 1))
513 call term_sendkeys(buf, "1")
514 call term_wait(buf)
515 call assert_equal('1', term_getline(buf, 1))
516 call term_sendkeys(buf, "2")
517 call term_wait(buf)
518 call assert_equal('½', term_getline(buf, 1))
519 call StopVimInTerminal(buf)
520 endfunc
521
505 " vim: shiftwidth=2 sts=2 expandtab 522 " vim: shiftwidth=2 sts=2 expandtab