15 lines
424 B
Bash
Executable File
15 lines
424 B
Bash
Executable File
#!/bin/bash
|
|
# test_n_flag.sh - Validates the -n flag behavior with non-empty files
|
|
|
|
# Create a non-empty file
|
|
echo "existing data" > non_empty.json
|
|
|
|
# Attempt to start a new conversation with -n pointing to a non-empty file
|
|
if "${DRHARNESS}" -F non_empty.json -n -m "Should fail" -d < /dev/null 2> stderr_output ; then
|
|
echo "Didn't fail on new on non empty file"
|
|
cat stderr_output
|
|
exit 1
|
|
fi
|
|
|
|
echo "PASS: n_flag"
|