http/bencode: add missing []Dict case

Fixes #238
This commit is contained in:
Leo Balduf
2016-10-01 08:06:42 -04:00
parent b96619d44a
commit 365a6caf43
2 changed files with 9 additions and 0 deletions

View File

@@ -30,6 +30,8 @@ var marshalTests = []struct {
{map[string]interface{}{"one": "aa", "two": "bb"}, []string{"d3:one2:aa3:two2:bbe", "d3:two2:bb3:one2:aae"}},
{map[string]interface{}{}, []string{"de"}},
{[]Dict{{"a": "b"}, {"c": "d"}}, []string{"ld1:a1:bed1:c1:dee", "ld1:c1:ded1:a1:bee"}},
}
func TestMarshal(t *testing.T) {