]> gitweb.factorcode.org Git - factor.git/commitdiff
curses.tests: only run the color test if term is color capable
authorBjörn Lindqvist <bjourne@gmail.com>
Sat, 20 Aug 2016 04:33:15 +0000 (06:33 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Sat, 20 Aug 2016 04:33:15 +0000 (06:33 +0200)
extra/curses/curses-tests.factor

index e480c1f1a17ee946375106111f318eb82a3fc95c..322fa6eea26977520590d7c88920394f1c8cb05d 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2009 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors calendar curses kernel threads tools.test
-strings sequences random ;
+USING: calendar curses curses.ffi kernel random sequences threads
+tools.test ;
 IN: curses.tests
 
 : hello-curses ( -- )
@@ -24,6 +24,8 @@ IN: curses.tests
     ] with-curses ;
 
 curses-ok? [
-    [ ] [ hello-curses ] unit-test
-    [ ] [ hello-curses-color ] unit-test
+    { } [ hello-curses ] unit-test
+    has_colors [
+        { } [ hello-curses-color ] unit-test
+    ] when
 ] when