keys_test.go
keys_test.go - Overview
This file contains tests for the KEYS
command functionality in the ironhawk package.
Detailed Documentation
TestKeys
Function
Purpose: Tests the KEYS
command with various patterns to ensure correct key matching.
Parameters:
t
(*testing.T): Testing object for running the test case.
Returns:
- None.
The function defines a series of test cases, each with a name, a list of commands to execute, and the expected results. It iterates through these test cases, executing each command and comparing the result with the expected value using assert.Equal
.
The testutils.UnorderedEqual
function is used to compare the results when the order of keys in the result is not guaranteed.
Code Examples
None.