diff options
Diffstat (limited to 'dhcpv4/options_test.go')
-rw-r--r-- | dhcpv4/options_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dhcpv4/options_test.go b/dhcpv4/options_test.go index 899fb2c..c06f6f5 100644 --- a/dhcpv4/options_test.go +++ b/dhcpv4/options_test.go @@ -144,6 +144,13 @@ func TestParseOption(t *testing.T) { require.Equal(t, OptionClientSystemArchitectureType, opt.Code(), "Code") require.Equal(t, 4, opt.Length(), "Length") require.Equal(t, option, opt.ToBytes(), "ToBytes") + + option = []byte{17, 4, '/', 'f', 'o', 'o'} + opt, err = ParseOption(option) + require.NoError(t, err) + require.Equal(t, OptionRootPath, opt.Code(), "Code") + require.Equal(t, 4, opt.Length(), "Length") + require.Equal(t, option, opt.ToBytes(), "ToBytes") } func TestParseOptionZeroLength(t *testing.T) { |