fix test suite

This commit is contained in:
hdt3213
2022-04-30 19:33:11 +08:00
parent 24faeb3c56
commit c1d800e110
2 changed files with 2 additions and 2 deletions

View File

@@ -575,7 +575,7 @@ func execSetBit(db *DB, args [][]byte) redis.Reply {
} else if valStr == "0" { } else if valStr == "0" {
v = 0 v = 0
} else { } else {
return protocol.MakeErrReply("ERR bit is not an integer or out of range\n") return protocol.MakeErrReply("ERR bit is not an integer or out of range")
} }
bs, errReply := db.getAsString(key) bs, errReply := db.getAsString(key)
if errReply != nil { if errReply != nil {

View File

@@ -622,7 +622,7 @@ func TestGetRange_StringExist_StartIdxIncorrectFormat(t *testing.T) {
incorrectValue := "incorrect" incorrectValue := "incorrect"
actual := testDB.Exec(nil, utils.ToCmdLine("GetRange", key, incorrectValue, fmt.Sprint(0))) actual := testDB.Exec(nil, utils.ToCmdLine("GetRange", key, incorrectValue, fmt.Sprint(0)))
asserts.AssertErrReply(t, actual, "-ERR value is not an integer or out of range") asserts.AssertErrReply(t, actual, "ERR value is not an integer or out of range")
} }
func TestGetRange_StringExist_EndIdxIncorrectFormat(t *testing.T) { func TestGetRange_StringExist_EndIdxIncorrectFormat(t *testing.T) {