From: Tim Kientzle Date: Fri, 26 Jun 2009 04:21:47 +0000 (-0400) Subject: Use different files for each sub-test here to make it easier to diagnose failures. X-Git-Tag: v2.8.0~567 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a75e2ec77dd6be874ca185393fae62b9f1c46193;p=thirdparty%2Flibarchive.git Use different files for each sub-test here to make it easier to diagnose failures. SVN-Revision: 1184 --- diff --git a/tar/test/test_windows.c b/tar/test/test_windows.c index f669a61cc..551cf35ce 100644 --- a/tar/test/test_windows.c +++ b/tar/test/test_windows.c @@ -177,46 +177,46 @@ DEFINE_TEST(test_windows) * Test1: Command line pattern matching. */ assertEqualInt(0, - systemf("%s -cf ../archive.tar a*", testprog)); + systemf("%s -cf ../archive1.tar a*", testprog)); assertEqualInt(0, - systemf("%s -tf ../archive.tar > ../list", testprog)); - assertFileContents(list1, sizeof(list1)-1, "../list"); + systemf("%s -tf ../archive1.tar > ../list1", testprog)); + assertFileContents(list1, sizeof(list1)-1, "../list1"); assertEqualInt(0, - systemf("%s -cf ../archive.tar b*", testprog)); + systemf("%s -cf ../archive2.tar b*", testprog)); assertEqualInt(0, - systemf("%s -tf ../archive.tar > ../list", testprog)); - assertFileContents(list2, sizeof(list2)-1, "../list"); + systemf("%s -tf ../archive2.tar > ../list2", testprog)); + assertFileContents(list2, sizeof(list2)-1, "../list2"); assertEqualInt(0, - systemf("%s -cf ../archive.tar ??c", testprog)); + systemf("%s -cf ../archive3.tar ??c", testprog)); assertEqualInt(0, - systemf("%s -tf ../archive.tar > ../list", testprog)); - assertFileContents(list3, sizeof(list3)-1, "../list"); + systemf("%s -tf ../archive3.tar > ../list3", testprog)); + assertFileContents(list3, sizeof(list3)-1, "../list3"); assertEqualInt(0, - systemf("%s -cf ../archive.tar *c", testprog)); + systemf("%s -cf ../archive3b.tar *c", testprog)); assertEqualInt(0, - systemf("%s -tf ../archive.tar > ../list", testprog)); - assertFileContents(list3, sizeof(list3)-1, "../list"); + systemf("%s -tf ../archive3b.tar > ../list3b", testprog)); + assertFileContents(list3, sizeof(list3)-1, "../list3b"); assertEqualInt(0, - systemf("%s -cf ../archive.tar fff/a?ca", testprog)); + systemf("%s -cf ../archive4.tar fff/a?ca", testprog)); assertEqualInt(0, - systemf("%s -tf ../archive.tar > ../list", testprog)); - assertFileContents(list4, sizeof(list4)-1, "../list"); + systemf("%s -tf ../archive4.tar > ../list4", testprog)); + assertFileContents(list4, sizeof(list4)-1, "../list4"); assertEqualInt(0, - systemf("%s -cf ../archive.tar aaa\\*", testprog)); + systemf("%s -cf ../archive5.tar aaa\\*", testprog)); assertEqualInt(0, - systemf("%s -tf ../archive.tar > ../list", testprog)); - assertFileContents(list5, sizeof(list5)-1, "../list"); + systemf("%s -tf ../archive5.tar > ../list5", testprog)); + assertFileContents(list5, sizeof(list5)-1, "../list5"); assertEqualInt(0, - systemf("%s -cf ../archive.tar fff\\a?ca aaa\\xx*", testprog)); + systemf("%s -cf ../archive6.tar fff\\a?ca aaa\\xx*", testprog)); assertEqualInt(0, - systemf("%s -tf ../archive.tar > ../list", testprog)); - assertFileContents(list6, sizeof(list6)-1, "../list"); + systemf("%s -tf ../archive6.tar > ../list6", testprog)); + assertFileContents(list6, sizeof(list6)-1, "../list6"); /* * Test2: Archive the file start with drive letters. @@ -224,96 +224,96 @@ DEFINE_TEST(test_windows) /* Test2a: start with "/" */ mkfullpath(&fp1, &fp2, "aaa/file1", 0); assertEqualInt(0, - systemf("%s -cf ../archive.tar %s > ../out 2> ../err", + systemf("%s -cf ../archive10.tar %s > ../out10 2> ../err10", testprog, fp1)); assertEqualInt(0, - systemf("%s -tf ../archive.tar > ../list", testprog)); + systemf("%s -tf ../archive10.tar > ../list10", testprog)); /* Check drive letters have been striped. */ - assertFileContents(fp2, strlen(fp2), "../list"); + assertFileContents(fp2, strlen(fp2), "../list10"); free(fp1); free(fp2); /* Test2b: start with "\" */ mkfullpath(&fp1, &fp2, "aaa/file1", 1); assertEqualInt(0, - systemf("%s -cf ../archive.tar %s > ../out 2> ../err", + systemf("%s -cf ../archive11.tar %s > ../out11 2> ../err11", testprog, fp1)); assertEqualInt(0, - systemf("%s -tf ../archive.tar > ../list", testprog)); + systemf("%s -tf ../archive11.tar > ../list11", testprog)); /* Check drive letters have been striped. */ - assertFileContents(fp2, strlen(fp2), "../list"); + assertFileContents(fp2, strlen(fp2), "../list11"); free(fp1); free(fp2); /* Test2c: start with "c:/" */ mkfullpath(&fp1, &fp2, "aaa/file1", 2); assertEqualInt(0, - systemf("%s -cf ../archive.tar %s > ../out 2> ../err", + systemf("%s -cf ../archive12.tar %s > ../out12 2> ../err12", testprog, fp1)); assertEqualInt(0, - systemf("%s -tf ../archive.tar > ../list", testprog)); + systemf("%s -tf ../archive12.tar > ../list12", testprog)); /* Check drive letters have been striped. */ - assertFileContents(fp2, strlen(fp2), "../list"); + assertFileContents(fp2, strlen(fp2), "../list12"); free(fp1); free(fp2); /* Test2d: start with "c:\" */ mkfullpath(&fp1, &fp2, "aaa/file1", 3); assertEqualInt(0, - systemf("%s -cf ../archive.tar %s > ../out 2> ../err", + systemf("%s -cf ../archive13.tar %s > ../out13 2> ../err13", testprog, fp1)); assertEqualInt(0, - systemf("%s -tf ../archive.tar > ../list", testprog)); + systemf("%s -tf ../archive13.tar > ../list13", testprog)); /* Check drive letters have been striped. */ - assertFileContents(fp2, strlen(fp2), "../list"); + assertFileContents(fp2, strlen(fp2), "../list13"); free(fp1); free(fp2); /* Test2e: start with "//./c:/" */ mkfullpath(&fp1, &fp2, "aaa/file1", 4); assertEqualInt(0, - systemf("%s -cf ../archive.tar %s > ../out 2> ../err", + systemf("%s -cf ../archive14.tar %s > ../out14 2> ../err14", testprog, fp1)); assertEqualInt(0, - systemf("%s -tf ../archive.tar > ../list", testprog)); + systemf("%s -tf ../archive14.tar > ../list14", testprog)); /* Check drive letters have been striped. */ - assertFileContents(fp2, strlen(fp2), "../list"); + assertFileContents(fp2, strlen(fp2), "../list14"); free(fp1); free(fp2); /* Test2f: start with "\\.\c:\" */ mkfullpath(&fp1, &fp2, "aaa/file1", 5); assertEqualInt(0, - systemf("%s -cf ../archive.tar %s > ../out 2> ../err", + systemf("%s -cf ../archive15.tar %s > ../out15 2> ../err15", testprog, fp1)); assertEqualInt(0, - systemf("%s -tf ../archive.tar > ../list", testprog)); + systemf("%s -tf ../archive15.tar > ../list15", testprog)); /* Check drive letters have been striped. */ - assertFileContents(fp2, strlen(fp2), "../list"); + assertFileContents(fp2, strlen(fp2), "../list15"); free(fp1); free(fp2); /* Test2g: start with "//?/c:/" */ mkfullpath(&fp1, &fp2, "aaa/file1", 6); assertEqualInt(0, - systemf("%s -cf ../archive.tar %s > ../out 2> ../err", + systemf("%s -cf ../archive16.tar %s > ../out16 2> ../err16", testprog, fp1)); assertEqualInt(0, - systemf("%s -tf ../archive.tar > ../list", testprog)); + systemf("%s -tf ../archive16.tar > ../list16", testprog)); /* Check drive letters have been striped. */ - assertFileContents(fp2, strlen(fp2), "../list"); + assertFileContents(fp2, strlen(fp2), "../list16"); free(fp1); free(fp2); /* Test2h: start with "\\?\c:\" */ mkfullpath(&fp1, &fp2, "aaa/file1", 7); assertEqualInt(0, - systemf("%s -cf ../archive.tar %s > ../out 2> ../err", + systemf("%s -cf ../archive17.tar %s > ../out17 2> ../err17", testprog, fp1)); assertEqualInt(0, - systemf("%s -tf ../archive.tar > ../list", testprog)); + systemf("%s -tf ../archive17.tar > ../list17", testprog)); /* Check drive letters have been striped. */ - assertFileContents(fp2, strlen(fp2), "../list"); + assertFileContents(fp2, strlen(fp2), "../list17"); free(fp1); free(fp2); #else