Skip to content

Commit

Permalink
Merge pull request hashicorp#2025 from ceh/skip-color-test
Browse files Browse the repository at this point in the history
packer: skip colored ui test if ui doesn't support colors
  • Loading branch information
mitchellh committed May 28, 2015
2 parents 1442260 + bd425db commit 8367c0b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packer/ui_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit 8367c0b

Please sign in to comment.