devicepath/ipv6_test.go

19 lines
420 B
Go
Raw Permalink 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 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())
})
}