mget_test.go
mget_test.go - Overview
This file contains tests for the MGET
command in the ironhawk package. It verifies the functionality of retrieving values for multiple keys, including cases with existing, non-existing, and mixed keys.
Detailed Documentation
TestMGET
Purpose: Tests the functionality of the MGET
command.
Parameters:
t
(*testing.T): Testing object for running the test.
Returns:
- None.
The function defines a set of test cases, each with a name, a series of commands to execute, and the expected results. It iterates through these test cases, executing the commands and asserting that the results match the expected values. The tests cover scenarios such as retrieving non-existent keys, existing keys, a mix of both, and calling MGET
with no keys.
Code Examples
None.