]> granicus.if.org Git - vim/commitdiff
patch 8.1.1474: 'ttybuiltin' is not tested v8.1.1474
authorBram Moolenaar <Bram@vim.org>
Thu, 6 Jun 2019 10:36:15 +0000 (12:36 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 6 Jun 2019 10:36:15 +0000 (12:36 +0200)
Problem:    'ttybuiltin' is not tested.
Solution:   At least test that it doesn't break things.

src/testdir/test_termcodes.vim
src/version.c

index d602ee5d5f0cef3be3354500ad6fd9a538d34c17..9cfc6498317c39ee1ec8c12e6def84fb3d816c8f 100644 (file)
@@ -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
index cd138ab9c3a312d2470fac0264bdea0597e3370e..a422cb0a4500d57c178fc242fc53ce45f4bad1fe 100644 (file)
@@ -767,6 +767,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1474,
 /**/
     1473,
 /**/