]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Assert contents for stderr; this might help track a bug that's showing up
authorTim Kientzle <kientzle@gmail.com>
Sun, 27 Dec 2009 23:54:52 +0000 (18:54 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sun, 27 Dec 2009 23:54:52 +0000 (18:54 -0500)
in the CDash nightly tests.

SVN-Revision: 1780

cpio/test/test_option_L_upper.c

index abe669facf293bf4b7ebb22d1c8c885d632c1536..1774343f6732da432f9f7026f4a84fc40e1be784 100644 (file)
@@ -58,6 +58,7 @@ DEFINE_TEST(test_option_L_upper)
 
        r = systemf(CAT " filelist | %s -pd copy >copy.out 2>copy.err", testprog);
        assertEqualInt(r, 0);
+       assertTextFileContents("1 block\n", "copy.err");
 
        failure("Regular -p without -L should preserve symlinks.");
        assertIsSymlink("copy/symlink", NULL);
@@ -72,25 +73,29 @@ DEFINE_TEST(test_option_L_upper)
        r = systemf(CAT " filelist | %s -o >archive.out 2>archive.err", testprog);
        failure("Error invoking %s -o ", testprog);
        assertEqualInt(r, 0);
+       assertTextFileContents("1 block\n", "archive.err");
 
        assertMakeDir("unpack", 0755);
        assertChdir("unpack");
        r = systemf(CAT " ../archive.out | %s -i >unpack.out 2>unpack.err", testprog);
-       assertChdir("..");
        failure("Error invoking %s -i", testprog);
        assertEqualInt(r, 0);
+       assertTextFileContents("1 block\n", "unpack.err");
+       assertChdir("..");
 
        assertIsSymlink("unpack/symlink", NULL);
 
        r = systemf(CAT " filelist | %s -oL >archive-L.out 2>archive-L.err", testprog);
        failure("Error invoking %s -oL", testprog);
        assertEqualInt(r, 0);
+       assertTextFileContents("1 block\n", "archive-L.err");
 
        assertMakeDir("unpack-L", 0755);
        assertChdir("unpack-L");
        r = systemf(CAT " ../archive-L.out | %s -i >unpack-L.out 2>unpack-L.err", testprog);
-       assertChdir("..");
        failure("Error invoking %s -i < archive-L.out", testprog);
        assertEqualInt(r, 0);
+       assertTextFileContents("1 block\n", "unpack-L.err");
+       assertChdir("..");
        assertIsReg("unpack-L/symlink", -1);
 }