add project
This commit is contained in:
46
CommandTests/02_basic_string_tests.sh
Executable file
46
CommandTests/02_basic_string_tests.sh
Executable file
@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "=== Basic String Commands Test ==="
|
||||
|
||||
echo "1. Testing SET and GET..."
|
||||
dotnet run -- set "test:string" "Hello World" -i default
|
||||
dotnet run -- get "test:string" -i default
|
||||
|
||||
echo ""
|
||||
echo "2. Testing APPEND..."
|
||||
dotnet run -- append "test:string" " - Appended!" -i default
|
||||
dotnet run -- get "test:string" -i default
|
||||
|
||||
echo ""
|
||||
echo "3. Testing INCR/DECR..."
|
||||
dotnet run -- set "test:counter" "10" -i default
|
||||
dotnet run -- incr "test:counter" -i default
|
||||
dotnet run -- incrby "test:counter" "5" -i default
|
||||
dotnet run -- decr "test:counter" -i default
|
||||
dotnet run -- get "test:counter" -i default
|
||||
|
||||
echo ""
|
||||
echo "4. Testing INCRBYFLOAT..."
|
||||
dotnet run -- set "test:float" "10.5" -i default
|
||||
dotnet run -- incrbyfloat "test:float" "2.3" -i default
|
||||
dotnet run -- get "test:float" -i default
|
||||
|
||||
echo ""
|
||||
echo "5. Testing GETRANGE/SETRANGE..."
|
||||
dotnet run -- set "test:range" "Hello World" -i default
|
||||
dotnet run -- getrange "test:range" "0" "4" -i default
|
||||
dotnet run -- setrange "test:range" "6" "Redis" -i default
|
||||
dotnet run -- get "test:range" -i default
|
||||
|
||||
echo ""
|
||||
echo "6. Testing STRLEN..."
|
||||
dotnet run -- strlen "test:range" -i default
|
||||
|
||||
echo ""
|
||||
echo "7. Testing MGET/MSET..."
|
||||
dotnet run -- mset --pairs key1=value1,key2=value2,key3=value3 -i default
|
||||
dotnet run -- mget key1 key2 key3 -i default
|
||||
|
||||
echo ""
|
||||
echo "Basic String Commands Test Complete!"
|
||||
echo ""
|
||||
Reference in New Issue
Block a user