You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-07-15 01:34:21 +02:00
archive format overrides could break brew formula
This commit is contained in:
28
internal/archiveformat/format_test.go
Normal file
28
internal/archiveformat/format_test.go
Normal file
@ -0,0 +1,28 @@
|
||||
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 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", For(ctx, "windowsamd64"))
|
||||
assert.Equal("tar.gz", For(ctx, "linux386"))
|
||||
}
|
Reference in New Issue
Block a user