From bd425db546a1637901980f76b3c13c5f513ff7d9 Mon Sep 17 00:00:00 2001 From: Emil Hessman Date: Tue, 7 Apr 2015 20:33:58 +0200 Subject: [PATCH] packer: skip colored ui test if ui doesn't support colors Fixes test failure on Windows. --- packer/ui_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packer/ui_test.go b/packer/ui_test.go index 08dd530a5..a42cd3033 100644 --- a/packer/ui_test.go +++ b/packer/ui_test.go @@ -35,6 +35,10 @@ func TestColoredUi(t *testing.T) { bufferUi := testUi() ui := &ColoredUi{UiColorYellow, UiColorRed, bufferUi} + if !ui.supportsColors() { + t.Skip("skipping for ui without color support") + } + ui.Say("foo") result := readWriter(bufferUi) if result != "\033[1;33mfoo\033[0m\n" {