devicepath/mac_test.go

19 lines
413 B
Go
Raw Normal View History

2023-09-18 11:47:44 +00:00
package devicepath_test
import (
"testing"
"git.faercol.me/faercol/devicepath"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestParseStringMac(t *testing.T) {
t.Run("OK", func(t *testing.T) {
var macDev devicepath.MacDevicePath
expected := "MAC(3c7c3fc1f935,0)"
require.NoError(t, macDev.ParseString(expected))
assert.Equal(t, expected, macDev.String())
})
}