1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00

fix: fixed writing golden files

This commit is contained in:
Carlos Alexandro Becker 2017-12-25 20:09:55 -02:00
parent bac7c6f611
commit 60001bf63c
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
2 changed files with 5 additions and 3 deletions

View File

@ -68,10 +68,12 @@ func TestFullFormulae(t *testing.T) {
assert.NoError(t, err)
formulae := out.String()
bts, err := ioutil.ReadFile("testdata/test.rb")
var golden = "testdata/test.rb.golden"
if *update {
ioutil.WriteFile(golden, []byte(formulae), 0655)
}
bts, err := ioutil.ReadFile(golden)
assert.NoError(t, err)
// ioutil.WriteFile("testdata/test.rb", []byte(formulae), 0644)
assert.Equal(t, string(bts), formulae)
}