testcase for SDIFFSTORE
@@ -3,3 +3,23 @@ def test_sadd(judge_command):
"SADD foo m1 m2 m3",
{"command_key_members": "SADD", "key": "foo", "members": "m1 m2 m3"},
)
+ judge_command(
+ "SADD foo m1", {"command_key_members": "SADD", "key": "foo", "members": "m1"}
+ )
+ judge_command("SADD foo", None)
+
+
+def test_sdiffstore(judge_command):
+ judge_command(
+ "SDIFFSTORE foo m1 m2 m3",
+ {
+ "command_destination_keys": "SDIFFSTORE",
+ "destination": "foo",
+ "keys": "m1 m2 m3",
+ },
+ )
+ judge_command(
+ "SDIFFSTORE foo m1",
+ {"command_destination_keys": "SDIFFSTORE", "destination": "foo", "keys": "m1"},
+ )
+ judge_command("SDIFFSTORE foo", None)
