Files
drharness/tests/test_rebase_parser_duplicate_indices.sh

21 lines
457 B
Bash
Executable File

#!/bin/bash
# test_rebase_parser_duplicate_indices.sh - Duplicate indices produces error
test_name="duplicate_indices"
content="pick 0 [user] hello
pick 1 [assistant] response
drop 0 [tool] duplicate"
set +e
OUTPUT=$("${DRHARNESS}" -z 3 "$content" 2>&1) || true
set -e
if ! echo "$OUTPUT" | grep -q "duplicate index 0"; then
echo "FAIL: $test_name - expected 'duplicate index 0' error"
echo "Got: $OUTPUT"
exit 1
fi
echo "PASS: $test_name"