2017-08-27 13:18:23 -03:00
|
|
|
package linux
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"testing"
|
|
|
|
|
2020-10-06 09:48:04 -03:00
|
|
|
"github.com/stretchr/testify/require"
|
2017-08-27 13:18:23 -03:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestArch(t *testing.T) {
|
|
|
|
for from, to := range map[string]string{
|
2019-05-29 09:09:52 -03:00
|
|
|
"linuxamd64": "amd64",
|
|
|
|
"linux386": "i386",
|
|
|
|
"linuxarm64": "arm64",
|
|
|
|
"linuxarm5": "armel",
|
|
|
|
"linuxarm6": "armhf",
|
|
|
|
"linuxarm7": "armhf",
|
|
|
|
"linuxppc64": "ppc64",
|
|
|
|
"linuxppc64le": "ppc64le",
|
|
|
|
"linuxwhat": "what",
|
2017-08-27 13:18:23 -03:00
|
|
|
} {
|
|
|
|
t.Run(fmt.Sprintf("%s to %s", from, to), func(t *testing.T) {
|
2020-10-06 09:48:04 -03:00
|
|
|
require.Equal(t, to, Arch(from))
|
2017-08-27 13:18:23 -03:00
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|