From cd87092823c7da83cae5a6f00d54779a785c29ec Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Sun, 29 Nov 2009 15:36:32 -0500 Subject: [PATCH] Adjust this test to verify the convention that tar always stores filenames with '/' path separators, even on Windows. SVN-Revision: 1683 --- tar/test/test_windows.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tar/test/test_windows.c b/tar/test/test_windows.c index 4c514ae07..0fc1d72c1 100644 --- a/tar/test/test_windows.c +++ b/tar/test/test_windows.c @@ -98,8 +98,11 @@ mkfullpath(char **path1, char **path2, const char *tpath, int type) p2 = fp2; while (*p1 != '\0') { if (*p1 == '\\') - *p2++ = *p1; - *p2++ = *p1++; + *p2 = '/'; + else + *p2 = *p1; + ++p1; + ++p2; } *p2++ = '\r'; *p2++ = '\n'; @@ -297,6 +300,7 @@ DEFINE_TEST(test_windows) /* Test2g: start with "//?/c:/" */ mkfullpath(&fp1, &fp2, "aaa/file1", 6); + failure("fp1=%s, fp2=%s", fp1, fp2); assertEqualInt(0, systemf("%s -cf ../archive16.tar %s > ../out16 2> ../err16", testprog, fp1)); @@ -309,6 +313,7 @@ DEFINE_TEST(test_windows) /* Test2h: start with "\\?\c:\" */ mkfullpath(&fp1, &fp2, "aaa/file1", 7); + failure("fp1=%s, fp2=%s", fp1, fp2); assertEqualInt(0, systemf("%s -cf ../archive17.tar %s > ../out17 2> ../err17", testprog, fp1)); -- 2.47.3