From: Tim Kientzle Date: Wed, 17 Feb 2010 05:50:02 +0000 (-0500) Subject: If file contents don't match, dump the expected value as well. X-Git-Tag: v3.0.0a~1256 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4dcb196d8da205964a7a849081092b405d96a0f;p=thirdparty%2Flibarchive.git If file contents don't match, dump the expected value as well. SVN-Revision: 1904 --- diff --git a/libarchive/test/main.c b/libarchive/test/main.c index 4aca9e046..effa1d316 100644 --- a/libarchive/test/main.c +++ b/libarchive/test/main.c @@ -821,9 +821,11 @@ assertion_text_file_contents(const char *buff, const char *fn) } failure_start(test_filename, test_line, "Contents don't match"); logprintf(" file=\"%s\"\n", fn); - if (n > 0) + if (n > 0) { hexdump(contents, buff, n, 0); - else { + logprintf(" expected\n", fn); + hexdump(buff, contents, s, 0); + } else { logprintf(" File empty, contents should be:\n"); hexdump(buff, NULL, s, 0); }