diff options
author | mm <mm@FreeBSD.org> | 2011-07-17 21:42:22 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2011-07-17 21:42:22 +0000 |
commit | 84c56da91a08ce9f1a669fa732a156e36b3ad358 (patch) | |
tree | e2aa60b473bd88d42e965988a7bd13041fd17954 /usr.bin/cpio/test/test_option_version.c | |
parent | 867c8ddd4db0c581c7d6f04f5317cdc34c07dd5c (diff) | |
download | FreeBSD-src-84c56da91a08ce9f1a669fa732a156e36b3ad358.zip FreeBSD-src-84c56da91a08ce9f1a669fa732a156e36b3ad358.tar.gz |
Update bsdcpio to 2.8.4
Use common code from lib/libarchive/libarchive_fe
Approved by: kientzle
MFC after: 2 weeks
Diffstat (limited to 'usr.bin/cpio/test/test_option_version.c')
-rw-r--r-- | usr.bin/cpio/test/test_option_version.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/cpio/test/test_option_version.c b/usr.bin/cpio/test/test_option_version.c index 8a25248..7345da1 100644 --- a/usr.bin/cpio/test/test_option_version.c +++ b/usr.bin/cpio/test/test_option_version.c @@ -74,14 +74,14 @@ verify(const char *p, size_t s) /* Skip a single trailing a,b,c, or d. */ if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd') ++q; - /* All terminated by a newline. */ + /* All terminated by end-of-line: \r, \r\n, or \n */ assert(s >= 1); failure("Version: %s", p); -#if defined(_WIN32) && !defined(__CYGWIN__) - assertEqualMem(q, "\r\n", 2); -#else - assertEqualMem(q, "\n", 1); -#endif + if (*q == '\x0d') { + if (q[1] != '\0') + assertEqualMem(q, "\x0d\x0a", 2); + } else + assertEqualMem(q, "\x0a", 1); } |