From cfeacdd44e1af14b12fcc4bb1bdc8646f0369a0d Mon Sep 17 00:00:00 2001 From: Julian Dax Date: Wed, 28 Dec 2016 17:36:06 +0100 Subject: [PATCH] Add sharness tests for colorful help License: MIT Signed-off-by: Julian Dax --- test/sharness/t0010-basic-commands.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/sharness/t0010-basic-commands.sh b/test/sharness/t0010-basic-commands.sh index 01566e01c261..b10f2ddb871b 100755 --- a/test/sharness/t0010-basic-commands.sh +++ b/test/sharness/t0010-basic-commands.sh @@ -80,4 +80,13 @@ test_expect_success "'ipfs commands --flags' output looks good" ' grep "ipfs repo gc --quiet / ipfs repo gc -q" commands.txt ' +test_expect_success "'ipfs --color' succeeds" ' + ipfs --color >commands.txt +' + +test_expect_success "'ipfs --color' is colorful" ' + grep $"\e\[0m" commands.txt && + grep $"\e\[36m" commands.txt +' + test_done