From f4dcb196d8da205964a7a849081092b405d96a0f Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Wed, 17 Feb 2010 00:50:02 -0500 Subject: [PATCH] If file contents don't match, dump the expected value as well. SVN-Revision: 1904 --- libarchive/test/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); } -- 2.47.3