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)
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim
index e5a3f2f..bf49740 100644
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -909,6 +909,9 @@
   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"])',