# HG changeset patch
# User Mads Kiilerich <mads@kiilerich.com>
# Date 1321832372 -3600
#      Mon Nov 21 00:39:32 2011 +0100
# Node ID d09ea5bbc9a495c4c6acbd11ea8829ee50e7ca8d
# Parent  fbbb323ce697f2339253c4b7bbe5e95fe9a79ed5
tests: skip color test on platforms without tic

diff --git a/tests/hghave b/tests/hghave
--- a/tests/hghave
+++ b/tests/hghave
@@ -218,6 +218,9 @@
 def has_serve():
     return os.name != 'nt' # gross approximation
 
+def has_tic():
+    return matchoutput('test -x "`which tic`"', '')
+
 checks = {
     "baz": (has_baz, "GNU Arch baz client"),
     "bzr": (has_bzr, "Canonical's Bazaar client"),
@@ -248,6 +251,7 @@
     "svn-bindings": (has_svn_bindings, "subversion python bindings"),
     "symlink": (has_symlink, "symbolic links"),
     "system-sh": (has_system_sh, "system() uses sh"),
+    "tic": (has_tic, "terminfo compiler"),
     "tla": (has_tla, "GNU Arch tla client"),
     "unix-permissions": (has_unix_permissions, "unix-style permissions"),
     "windows": (has_windows, "Windows"),
diff --git a/tests/test-status-color.t b/tests/test-status-color.t
--- a/tests/test-status-color.t
+++ b/tests/test-status-color.t
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" tic || exit 80
+
   $ echo "[extensions]" >> $HGRCPATH
   $ echo "color=" >> $HGRCPATH
   $ echo "[color]" >> $HGRCPATH