Commit 0fbd9b80 authored by Yaroslav Halchenko's avatar Yaroslav Halchenko

BF: provide full path to the file being checked

parent 8f204cef
...@@ -84,16 +84,16 @@ function assert_line_in_file { ...@@ -84,16 +84,16 @@ function assert_line_in_file {
else else
match_param="" match_param=""
fi fi
filepath="$TMP_DIR/$file"
if grep -Fq$match_param "$line" "$TMP_DIR/$file"; then if grep -Fq$match_param "$line" "$filepath"; then
echo "SUCCESS: line found" echo "SUCCESS: line '$line' found"
else else
echo -n "FAIL: File $file did not contain: $line. " echo -n "FAIL: File $filepath did not contain: $line. "
if [ -e "$file" ]; then if [ -e "$filepath" ]; then
echo "Full file content:" echo "Full file content:"
cat "$file" cat "$filepath"
else else
echo "File does not exist." echo "File $filepath does not exist."
fi fi
test_teardown test_teardown
exit 1 exit 1
......
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