Adding support for bit commands get/setrange
This commit is contained in:
committed by
Jonathan Leibiusky
parent
e12f655fa3
commit
430601f31e
@@ -17,4 +17,16 @@ public class BitCommandsTest extends JedisCommandTestBase {
|
||||
bbit = jedis.getbit("bfoo".getBytes(), 0);
|
||||
assertEquals(1, bbit);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setAndgetrange() {
|
||||
jedis.set("key1", "Hello World");
|
||||
long reply = jedis.setrange("key1", 6, "Jedis");
|
||||
assertEquals(11, reply);
|
||||
|
||||
assertEquals(jedis.get("key1"), "Hello Jedis");
|
||||
|
||||
assertEquals("Hello", jedis.getrange("key1", 0, 4));
|
||||
assertEquals("Jedis", jedis.getrange("key1", 6, 11));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user