]> granicus.if.org Git - vim/commitdiff
patch 8.1.1634: terminal test fails when term_getansicolors() is missing v8.1.1634
authorBram Moolenaar <Bram@vim.org>
Thu, 4 Jul 2019 20:32:39 +0000 (22:32 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 4 Jul 2019 20:32:39 +0000 (22:32 +0200)
Problem:    Terminal test fails when term_getansicolors() is missing.
            Diff test fails without +rightleft.  (Dominique Pelle)
Solution:   Check if term_getansicolors() is supported. (closes #4597)

src/testdir/test_diffmode.vim
src/testdir/test_terminal.vim
src/version.c

index e5a3f2fcf462e3050ac88b4e36737e194c5871bd..bf4974077751473083cbd588659e98cb065092d0 100644 (file)
@@ -909,6 +909,9 @@ func Test_diff_of_diff()
   if !CanRunVimInTerminal()
     throw 'Skipped: cannot run Vim in a terminal window'
   endif
+  if !has("rightleft")
+    throw 'Skipped: rightleft not supported'
+  endif
 
   call writefile([
        \ 'call setline(1, ["aa","bb","cc","@@ -3,2 +5,7 @@","dd","ee","ff"])',
index fa9eb1e996c088c41f6a24977e3fb48591836527..6a9a6aa4efed732346c59b932cc409daa02e17c7 100644 (file)
@@ -1434,6 +1434,9 @@ func Test_terminal_api_call_fail_delete()
 endfunc
 
 func Test_terminal_ansicolors_default()
+  if !exists('*term_getansicolors')
+    throw 'Skipped: term_getansicolors() not supported'
+  endif
   let colors = [
        \ '#000000', '#e00000',
        \ '#00e000', '#e0e000',
@@ -1465,6 +1468,9 @@ let s:test_colors = [
        \]
 
 func Test_terminal_ansicolors_global()
+  if !exists('*term_getansicolors')
+    throw 'Skipped: term_getansicolors() not supported'
+  endif
   let g:terminal_ansi_colors = reverse(copy(s:test_colors))
   let buf = Run_shell_in_terminal({})
   call assert_equal(g:terminal_ansi_colors, term_getansicolors(buf))
@@ -1476,6 +1482,9 @@ func Test_terminal_ansicolors_global()
 endfunc
 
 func Test_terminal_ansicolors_func()
+  if !exists('*term_getansicolors')
+    throw 'Skipped: term_getansicolors() not supported'
+  endif
   let g:terminal_ansi_colors = reverse(copy(s:test_colors))
   let buf = Run_shell_in_terminal({'ansi_colors': s:test_colors})
   call assert_equal(s:test_colors, term_getansicolors(buf))
index 20bff057c21376b16018415c7733a5c5e3901714..d1e12c8238ea242f77add68b14766eaa2a722c7d 100644 (file)
@@ -777,6 +777,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1634,
 /**/
     1633,
 /**/