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"])',
endfunc
func Test_terminal_ansicolors_default()
+ if !exists('*term_getansicolors')
+ throw 'Skipped: term_getansicolors() not supported'
+ endif
let colors = [
\ '#000000', '#e00000',
\ '#00e000', '#e0e000',
\]
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))
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))