packer: skip colored ui test if ui doesn't support colors

Fixes test failure on Windows.
This commit is contained in:
Emil Hessman 2015-04-07 20:33:58 +02:00
parent b49d74d999
commit bd425db546
1 changed files with 4 additions and 0 deletions

View File

@ -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" {