19 lines
442 B
Bash
Executable File
19 lines
442 B
Bash
Executable File
#!/bin/bash
|
|
# test_rebase_parser_invalid_command_digit.sh - Line starting with digit (invalid command) produces error
|
|
|
|
test_name="invalid_command_digit"
|
|
|
|
content="0 [user] no command"
|
|
|
|
set +e
|
|
OUTPUT=$("${DRHARNESS}" -z 3 "$content" 2>&1) || true
|
|
set -e
|
|
|
|
if ! echo "$OUTPUT" | grep -q "invalid command: '0'"; then
|
|
echo "FAIL: $test_name - expected 'invalid command: 0' error"
|
|
echo "Got: $OUTPUT"
|
|
exit 1
|
|
fi
|
|
|
|
echo "PASS: $test_name"
|