Files
drharness/tests/test_rebase_parser_index_out_of_range.sh

20 lines
445 B
Bash
Executable File

#!/bin/bash
# test_rebase_parser_index_out_of_range.sh - Out of range index produces error
test_name="index_out_of_range"
content="pick 0 [user] hello
pick 10 [assistant] response"
set +e
OUTPUT=$("${DRHARNESS}" -z 3 "$content" 2>&1) || true
set -e
if ! echo "$OUTPUT" | grep -q "index 10 out of range"; then
echo "FAIL: $test_name - expected 'index 10 out of range' error"
echo "Got: $OUTPUT"
exit 1
fi
echo "PASS: $test_name"