1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-15 13:53:25 +02:00
Carlos Alexandro Becker d85a9001ec
removing all assert.New because vet shadow complains about this now
aaaaaaaaaaarhhhhhhhhgttt
2017-09-26 19:24:49 -03:00

28 lines
541 B
Go

package archiveformat
import (
"testing"
"github.com/goreleaser/goreleaser/config"
"github.com/goreleaser/goreleaser/context"
"github.com/stretchr/testify/assert"
)
func TestFormatFor(t *testing.T) {
var ctx = &context.Context{
Config: config.Project{
Archive: config.Archive{
Format: "tar.gz",
FormatOverrides: []config.FormatOverride{
{
Goos: "windows",
Format: "zip",
},
},
},
},
}
assert.Equal(t, "zip", For(ctx, "windowsamd64"))
assert.Equal(t, "tar.gz", For(ctx, "linux386"))
}