From: Tim Kientzle Date: Sun, 17 Jan 2010 22:55:10 +0000 (-0500) Subject: When verifying the files recognized by tar, ignore end-of-line variations. X-Git-Tag: v2.8.0~9^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=625385e78cb74cb08c8819ea20ab95db44936886;p=thirdparty%2Flibarchive.git When verifying the files recognized by tar, ignore end-of-line variations. SVN-Revision: 1829 --- diff --git a/tar/test/test_patterns.c b/tar/test/test_patterns.c index 2ba4bd3e9..fee98be9b 100644 --- a/tar/test/test_patterns.c +++ b/tar/test/test_patterns.c @@ -33,7 +33,12 @@ DEFINE_TEST(test_patterns) const char *reffile2 = "test_patterns_2.tar"; const char *reffile3 = "test_patterns_3.tar"; const char *reffile4 = "test_patterns_4.tar"; - const char *p; + + const char *tar2aExpected[] = { + "/tmp/foo/bar/", + "/tmp/foo/bar/baz", + NULL + }; /* * Test basic command-line pattern handling. @@ -62,12 +67,7 @@ DEFINE_TEST(test_patterns) r = systemf("%s tf %s /tmp/foo/bar > tar2a.out 2> tar2a.err", testprog, reffile2); assertEqualInt(r, 0); -#if !defined(_WIN32) || defined(__CYGWIN__) - 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"); + assertFileContainsLinesAnyOrder("tar2a.out", tar2aExpected); assertEmptyFile("tar2a.err"); /*