diff --git a/tests/integration.sh b/tests/integration.sh index fb14a76..d96d328 100755 --- a/tests/integration.sh +++ b/tests/integration.sh @@ -124,6 +124,19 @@ function test_bitpos() EXPECTED="3" [ "$FOUND" == "$EXPECTED" ] } +function test_memory() +{ + echo "test_memory" + FOUND=$(echo "FLUSHDB" | redis-cli) + FOUND=$(echo "INFO memory" | redis-cli | grep --color=no "used_memory:" | sed 's/\r//g') + EXPECTED="used_memory:827376" + [ "$FOUND" == "$EXPECTED" ] + + FOUND=$(echo "R.SETBIT test_memory 0 1" | redis-cli) + FOUND=$(echo "INFO memory" | redis-cli | grep --color=no "used_memory:" | sed 's/\r//g') + EXPECTED="used_memory:827480" + [ "$FOUND" == "$EXPECTED" ] +} function test_done() { echo "All integration tests passed" @@ -134,4 +147,5 @@ test_rsetbit_rgetbit_wrong_arity test_rbitop test_bitcount test_bitpos +test_memory test_done \ No newline at end of file