1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-03 13:11:48 +02:00
goreleaser/internal/linux/arch_test.go
Carlos Alexandro Becker 12c7d38eb9
fix: properly translate mips arch (#2126)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-03-20 15:16:26 -03:00

31 lines
757 B
Go

package linux
import (
"fmt"
"testing"
"github.com/stretchr/testify/require"
)
func TestArch(t *testing.T) {
for from, to := range map[string]string{
"linuxamd64": "amd64",
"linux386": "i386",
"linuxarm64": "arm64",
"linuxarm5": "armel",
"linuxarm6": "armhf",
"linuxarm7": "armhf",
"linuxppc64": "ppc64",
"linuxppc64le": "ppc64le",
"linuxwhat": "what",
"linuxmips64lesoftfloat": "mips64el",
"linuxmipslehardfloat": "mipsel",
"linuxmipssoftfloat": "mips",
"linuxmips64hardfloat": "mips64",
} {
t.Run(fmt.Sprintf("%s to %s", from, to), func(t *testing.T) {
require.Equal(t, to, Arch(from))
})
}
}