nil bulk string test

master
Jordan Orelli 11 years ago
parent f6439564b7
commit 38c4928bb8

@ -11,6 +11,12 @@ type valueTest struct {
}
func eq(v1, v2 value) bool {
if v1 == nil {
return v2 == nil
} else if v2 == nil {
return false
}
b1, b2 := getBytes(v1), getBytes(v2)
if len(b1) != len(b2) {
return false
@ -44,7 +50,7 @@ var valueTests = []valueTest{
{"-one two ", Error("one two ")}, // trailing space
{"- one two", Error(" one two")}, // leading space
// {"$-1\r\n", nil},
{"$-1\r\n", nil},
// {"$0\r\n\r\n", BulkString("")}, // is this even a thing?
// {"$1\r\nx\r\n", BulkString("x")},
// {"$4\r\netsy\r\n", BulkString("etsy")},

Loading…
Cancel
Save