@@ -2050,6 +2050,25 @@ var _ = Describe("Commands", func() {
2050
2050
Expect (lRange .Val ()).To (Equal ([]string {"two" , "three" }))
2051
2051
})
2052
2052
2053
+ It ("should LPopCount" , func () {
2054
+ rPush := client .RPush (ctx , "list" , "one" )
2055
+ Expect (rPush .Err ()).NotTo (HaveOccurred ())
2056
+ rPush = client .RPush (ctx , "list" , "two" )
2057
+ Expect (rPush .Err ()).NotTo (HaveOccurred ())
2058
+ rPush = client .RPush (ctx , "list" , "three" )
2059
+ Expect (rPush .Err ()).NotTo (HaveOccurred ())
2060
+ rPush = client .RPush (ctx , "list" , "four" )
2061
+ Expect (rPush .Err ()).NotTo (HaveOccurred ())
2062
+
2063
+ lPopCount := client .LPopCount (ctx , "list" , 2 )
2064
+ Expect (lPopCount .Err ()).NotTo (HaveOccurred ())
2065
+ Expect (lPopCount .Val ()).To (Equal ([]string {"one" , "two" }))
2066
+
2067
+ lRange := client .LRange (ctx , "list" , 0 , - 1 )
2068
+ Expect (lRange .Err ()).NotTo (HaveOccurred ())
2069
+ Expect (lRange .Val ()).To (Equal ([]string {"three" , "four" }))
2070
+ })
2071
+
2053
2072
It ("should LPos" , func () {
2054
2073
rPush := client .RPush (ctx , "list" , "a" )
2055
2074
Expect (rPush .Err ()).NotTo (HaveOccurred ())
0 commit comments