Mercurial > vim
diff src/testdir/test_terminal.vim @ 17270:9508c12eec55 v8.1.1634
patch 8.1.1634: terminal test fails when term_getansicolors() is missing
commit https://github.com/vim/vim/commit/981d9dc8f3d7a470eb3be7ba60fe1c1f31e7f470
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 4 22:32:39 2019 +0200
patch 8.1.1634: terminal test fails when term_getansicolors() is missing
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 04 Jul 2019 22:45:05 +0200 |
parents | 041156ce1d22 |
children | 0da9bc55c31a |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -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))