Skip to main content

getrange_test.go

getrange_test.go - Overview

This file contains tests for the GETRANGE command, verifying that it returns the correct substring of a string or byte array.

Detailed Documentation

generateByteArrayForGetrangeTestCase

  • Purpose: Generates commands and expected values for testing GETRANGE on a byte array.
  • Parameters: None
  • Returns:
    • []string - Commands to execute.
    • []interface{} - Expected results.

TestGETRANGE

  • Purpose: Tests the GETRANGE command with various inputs, including strings and byte arrays.
  • Parameters:
    • t: *testing.T - Testing context.
  • Returns: None

Getting Started Relevance