devicepath/ipv6_test.go

18 lines
420 B
Go

package devicepath_test
import (
"testing"
"git.faercol.me/faercol/devicepath"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestParseIpv6String(t *testing.T) {
t.Run("OK", func(t *testing.T) {
expected := "IPv6([::]:\u003c-\u003e[::]:,0,0)"
var dev devicepath.Ipv6DevicePath
require.NoError(t, dev.ParseString(expected))
assert.Equal(t, expected, dev.String())
})
}