X-Git-Url: http://git.shiar.nl/barcat.git/blobdiff_plain/5a425b94d943da2ed750a875487d877e1a728d54..65c8fa48dbb0d3a3ba0016d761acf99acf964f37:/t/regress.t diff --git a/t/regress.t b/t/regress.t index 84f3c99..b8d05dd 100755 --- a/t/regress.t +++ b/t/regress.t @@ -6,10 +6,16 @@ test_count=0 fail_count=0 COLUMNS=40 +colorize= +test -t 1 && colorize=1 +color () { + test -n "$colorize" && + printf '\e[%sm' $@ +} regenerate= diffcmd () { comm --nocheck-order --output-delimiter=::: -3 $@ | - perl -pe'END{exit !!$.} s/^:::/>/ || s/^// || s/^/$(color 32)0)) +color 0 +exit $fail_count