From 69fe093ef3d0472f0a1dbf0437e748ba43c1566d Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Wed, 8 Apr 2015 08:47:37 +0000 Subject: [PATCH] Suppress errors if the 'tput' command doesn't exist --- CHANGELOG.md | 4 ++++ module.l | 2 +- unit.l | 9 +++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0afba5a..ce295bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.6.1 (2015-04-08) + + * Suppress errors if the 'tput' command doesn't exist + ## 0.6.0 (2015-04-05) * Move test reporters to their own directory diff --git a/module.l b/module.l index 912e114..3021b71 100644 --- a/module.l +++ b/module.l @@ -1,6 +1,6 @@ [de MODULE_INFO ("name" "unit") - ("version" "0.6.0") + ("version" "0.6.1") ("summary" "Unit Testing framework for PicoLisp") ("source" "https://github.com/aw/picolisp-unit.git") ("author" "Alexander Williams") diff --git a/unit.l b/unit.l index 46bd55c..35a6c63 100644 --- a/unit.l +++ b/unit.l @@ -44,10 +44,11 @@ # reporter [de colour (Colour) - (cond ((assoc (lowc Colour) *Colours) (call 'tput "setaf" (cdr @))) - ((= (lowc Colour) "bold") (call 'tput "bold")) - (T (call 'tput "sgr0")) ) - NIL ] + (err "/dev/null" + (cond ((assoc (lowc Colour) *Colours) (call 'tput "setaf" (cdr @))) + ((= (lowc Colour) "bold") (call 'tput "bold")) + (T (call 'tput "sgr0")) ) + NIL ] [de plural? (String) (when (not (= (length String) 1)) "s") ]