MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / TestLlen

Function TestLlen

IceFireDB-Redis-Proxy/test/cmd_list_test.go:448–478  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

446}
447
448func TestLlen(t *testing.T) {
449 server.Clear()
450 c, err := proto.Dial(server.Addr())
451 ok(t, err)
452 defer c.Close()
453 s := server.Direct()
454 s.Push("l", "aap", "noot", "mies", "vuur")
455
456 mustDo(t, c,
457 "LLEN", "l",
458 proto.Int(4),
459 )
460
461 // Non existing key
462 must0(t, c,
463 "LLEN", "nonexisting",
464 )
465
466 // Wrong type of key
467 mustOK(t, c, "SET", "str", "value")
468 mustDo(t, c,
469 "LLEN", "str",
470 proto.Error(msgWrongType),
471 )
472
473 // Too many arguments
474 mustDo(t, c,
475 "LLEN", "too", "many",
476 proto.Error("ERR wrong number of arguments for 'llen' command"),
477 )
478}
479
480func TestLtrim(t *testing.T) {
481 server.Clear()

Callers

nothing calls this directly

Calls 11

ClearFunction · 0.92
DialFunction · 0.92
AddrFunction · 0.92
DirectFunction · 0.92
IntFunction · 0.92
ErrorFunction · 0.92
okFunction · 0.70
mustDoFunction · 0.70
must0Function · 0.70
mustOKFunction · 0.70
CloseMethod · 0.65

Tested by

no test coverage detected