mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-02-03 13:11:48 +02:00
12c7d38eb9
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
31 lines
757 B
Go
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))
|
|
})
|
|
}
|
|
}
|