From: Joel Rosdahl Date: Tue, 1 Sep 2020 15:10:38 +0000 (+0200) Subject: Improve error message from expect_(not_)contains X-Git-Tag: v4.0~143 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd654743cb90e668b9ade3ac5e4ae3b1ed213134;p=thirdparty%2Fccache.git Improve error message from expect_(not_)contains --- diff --git a/test/run b/test/run index fab05c365..2bc580dbe 100755 --- a/test/run +++ b/test/run @@ -234,7 +234,7 @@ expect_contains() { test_failed "$file not found" fi if ! fgrep -q "$string" "$file"; then - test_failed "File $file does not contain: $string. Actual content: $(cat $file)" + test_failed "File $file does not contain \"$string\"\nActual content: $(cat $file)" fi } @@ -246,7 +246,7 @@ expect_not_contains() { test_failed "$file not found" fi if fgrep -q "$string" "$file"; then - test_failed "File $file contains: $string. Actual content: $(cat $file)" + test_failed "File $file contains \"$string\"\nActual content: $(cat $file)" fi }