diff options
Diffstat (limited to 'dhcpv4/option_userclass_test.go')
-rw-r--r-- | dhcpv4/option_userclass_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dhcpv4/option_userclass_test.go b/dhcpv4/option_userclass_test.go index 0e74ee1..72cf131 100644 --- a/dhcpv4/option_userclass_test.go +++ b/dhcpv4/option_userclass_test.go @@ -62,6 +62,16 @@ func TestParseOptUserClassMicrosoft(t *testing.T) { require.Equal(t, []byte("linuxboot"), opt.UserClasses[0]) } +func TestParseOptUserClassMicrosoftShort(t *testing.T) { + expected := []byte{ + 77, 1, 'l', + } + opt, err := ParseOptUserClass(expected) + require.NoError(t, err) + require.Equal(t, 1, len(opt.UserClasses)) + require.Equal(t, []byte("l"), opt.UserClasses[0]) +} + func TestParseOptUserClassMicrosoftLongerThanLength(t *testing.T) { expected := []byte{ 77, 9, 'l', 'i', 'n', 'u', 'x', 'b', 'o', 'o', 't', 'X', |