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:
parent
b44e8029c4
commit
7d8b698664
@ -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"))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user