]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
If file contents don't match, dump the expected value as well.
authorTim Kientzle <kientzle@gmail.com>
Wed, 17 Feb 2010 05:50:02 +0000 (00:50 -0500)
committerTim Kientzle <kientzle@gmail.com>
Wed, 17 Feb 2010 05:50:02 +0000 (00:50 -0500)
SVN-Revision: 1904

libarchive/test/main.c

index 4aca9e046582526780ee71cf3d79f3351298fe50..effa1d316b476bc64f8e55b559ea6c8449d1c524 100644 (file)
@@ -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);
        }