Commit 8f204cef authored by Yaroslav Halchenko's avatar Yaroslav Halchenko

ENH: dump entire content of the file or report if missing whenever assert_line_in_file fails

All files in consideration are small AFAIK so should be ok to just dump them
parent b072a501
......@@ -88,7 +88,13 @@ function assert_line_in_file {
if grep -Fq$match_param "$line" "$TMP_DIR/$file"; then
echo "SUCCESS: line found"
else
echo "FAIL: File $file did not contain: $line"
echo -n "FAIL: File $file did not contain: $line. "
if [ -e "$file" ]; then
echo "Full file content:"
cat "$file"
else
echo "File does not exist."
fi
test_teardown
exit 1
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment