]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Consider carriage return code on Windows.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 16 Feb 2009 06:56:51 +0000 (01:56 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 16 Feb 2009 06:56:51 +0000 (01:56 -0500)
SVN-Revision: 641

tar/test/test_patterns.c
tar/test/test_version.c

index 227b4a53d4165ede00613e6707ad7e4b6eb6decc..8d17bd63efd2a085c366e2c2bf6f9299a347b011 100644 (file)
@@ -59,7 +59,11 @@ DEFINE_TEST(test_patterns)
        r = systemf("%s tf %s /tmp/foo/bar > tar2a.out 2> tar2a.err",
            testprog, reffile2);
        assertEqualInt(r, 0);
+#ifndef _WIN32
        p = "/tmp/foo/bar/\n/tmp/foo/bar/baz\n";
+#else
+       p = "/tmp/foo/bar/\r\n/tmp/foo/bar/baz\r\n";
+#endif
        assertFileContents(p, strlen(p), "tar2a.out");
        assertEmptyFile("tar2a.err");
 
index 6ed656d80244af38827ee0880ed6a84f0f759d6b..a3b7151e137899371dad57172b2501ca3de5b87d 100644 (file)
@@ -88,6 +88,10 @@ DEFINE_TEST(test_version)
                ++q;
        /* All terminated by a newline. */
        assert(s >= 1);
+#ifndef _WIN32
        assertEqualMem(q, "\n", 1);
+#else
+       assertEqualMem(q, "\r\n", 2);
+#endif
        free(p);
 }