Messages can have empty bodies, but empty files are not messages. --- test/test-lib.sh | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/test/test-lib.sh b/test/test-lib.sh index 1a6525df..b5aa94dd 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -388,6 +388,14 @@ test_expect_equal_message_body () { test "$#" = 2 || error "bug in the test script: not 2 parameters to test_expect_equal_file" + for file in "$1" "$2"; do + if [ ! -s "$file" ]; then + test_failure_ "Missing or zero length file: $file" + inside_subtest= + return $? + fi + done + expected=$(sed '1,/^$/d' "$1") output=$(sed '1,/^$/d' "$2") test_expect_equal "$expected" "$output" -- 2.39.2 _______________________________________________ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org