Files
drharness/tests/test_rebase_parser_invalid_command.sh

20 lines
443 B
Bash
Executable File

#!/bin/bash
# test_rebase_parser_invalid_command.sh - Invalid command produces error
test_name="invalid_command"
content="pick 0 [user] hello
squash 1 [assistant] response"
set +e
OUTPUT=$("${DRHARNESS}" -z 3 "$content" 2>&1) || true
set -e
if ! echo "$OUTPUT" | grep -q "invalid command: 'squash'"; then
echo "FAIL: $test_name - expected 'invalid command: squash' error"
echo "Got: $OUTPUT"
exit 1
fi
echo "PASS: $test_name"