1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-09 13:36:56 +02:00

added more tests

This commit is contained in:
Carlos Alexandro Becker 2017-04-21 16:03:36 -03:00
parent b44e8029c4
commit 7d8b698664
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -63,3 +63,22 @@ func TestRunPipe(t *testing.T) {
assert.Error(Pipe{}.Run(ctx))
})
}
func TestFormatFor(t *testing.T) {
var assert = assert.New(t)
var ctx = &context.Context{
Config: config.Project{
Archive: config.Archive{
Format: "tar.gz",
FormatOverrides: []config.FormatOverride{
{
Goos: "windows",
Format: "zip",
},
},
},
},
}
assert.Equal("zip", formatFor(ctx, "windowsamd64"))
assert.Equal("tar.gz", formatFor(ctx, "linux386"))
}