2017-05-11 00:05:51 -03:00
|
|
|
package ext
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2017-07-06 19:49:21 -03:00
|
|
|
"github.com/goreleaser/goreleaser/internal/buildtarget"
|
2017-05-11 00:05:51 -03:00
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestExtWindows(t *testing.T) {
|
2017-07-06 19:49:21 -03:00
|
|
|
assert.Equal(t, ".exe", For(buildtarget.New("windows", "", "")))
|
|
|
|
assert.Equal(t, ".exe", For(buildtarget.New("windows", "adm64", "")))
|
2017-05-11 00:05:51 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
func TestExtOthers(t *testing.T) {
|
2017-07-06 19:49:21 -03:00
|
|
|
assert.Empty(t, "", For(buildtarget.New("linux", "", "")))
|
|
|
|
assert.Empty(t, "", For(buildtarget.New("linuxwin", "", "")))
|
|
|
|
assert.Empty(t, "", For(buildtarget.New("winasdasd", "sad", "6")))
|
2017-05-11 00:05:51 -03:00
|
|
|
}
|