Mercurial > vim
changeset 16947:b2179cf1a0a5 v8.1.1474
patch 8.1.1474: 'ttybuiltin' is not tested
commit https://github.com/vim/vim/commit/9aeb33639f49511cc16962a11a40844693ddb15e
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 6 12:36:15 2019 +0200
patch 8.1.1474: 'ttybuiltin' is not tested
Problem: 'ttybuiltin' is not tested.
Solution: At least test that it doesn't break things.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 06 Jun 2019 12:45:05 +0200 |
parents | 17aa054c8ec7 |
children | 1583207ec2ab |
files | src/testdir/test_termcodes.vim src/version.c |
diffstat | 2 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_termcodes.vim +++ b/src/testdir/test_termcodes.vim @@ -717,4 +717,24 @@ func Test_get_termcode() set t_k1= set t_k1& call assert_equal(k1, &t_k1) + + " use external termcap first + set nottybuiltin + set t_k1= + set t_k1& + " when using external termcap may get something else, but it must not be + " empty, since we would fallback to the builtin one. + call assert_notequal('', &t_k1) + + if &term =~ 'xterm' + " use internal termcap first + let term_save = &term + let &term = 'builtin_' .. &term + set t_k1= + set t_k1& + call assert_equal(k1, &t_k1) + let &term = term_save + endif + + set ttybuiltin endfunc