mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-19 06:21:41 -04:00
Merge pull request #2025 from ceh/skip-color-test
packer: skip colored ui test if ui doesn't support colors
This commit is contained in:
@@ -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" {
|
||||
|
||||
Reference in New Issue
Block a user