devicepath/ipv4_test.go

18 lines
411 B
Go

package devicepath_test
import (
"testing"
"git.faercol.me/faercol/devicepath"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestParseIpv4String(t *testing.T) {
t.Run("OK", func(t *testing.T) {
expected := "IPv4(0.0.0.00.0.0.0,0,0)"
var dev devicepath.Ipv4DevicePath
require.NoError(t, dev.ParseString(expected))
assert.Equal(t, expected, dev.String())
})
}