From 01b58669b0b02f6ce746b94b6fe4e92015203506 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 10 Jul 2014 13:09:09 -0700 Subject: [PATCH] provisioners/local-exec: tests pass on Windows due to line-endings diff /cc @armon --- .../provisioners/local-exec/resource_provisioner_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/builtin/provisioners/local-exec/resource_provisioner_test.go b/builtin/provisioners/local-exec/resource_provisioner_test.go index 5f282872d..2882e26e8 100644 --- a/builtin/provisioners/local-exec/resource_provisioner_test.go +++ b/builtin/provisioners/local-exec/resource_provisioner_test.go @@ -3,6 +3,7 @@ package localexec import ( "io/ioutil" "os" + "strings" "testing" "github.com/hashicorp/terraform/config" @@ -31,8 +32,10 @@ func TestResourceProvider_Apply(t *testing.T) { t.Fatalf("err: %v", err) } - if string(raw) != "foo\n" { - t.Fatalf("bad: %s", raw) + actual := strings.TrimSpace(string(raw)) + expected := "foo" + if actual != expected { + t.Fatalf("bad: %#v", actual) } }