Deleted Added
full compact
test_copy.c (348608) test_copy.c (358090)
1/*-
2 * Copyright (c) 2003-2007 Tim Kientzle
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25#include "test.h"
1/*-
2 * Copyright (c) 2003-2007 Tim Kientzle
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25#include "test.h"
26__FBSDID("$FreeBSD: stable/10/contrib/libarchive/tar/test/test_copy.c 348608 2019-06-04 10:36:26Z mm $");
26__FBSDID("$FreeBSD: stable/10/contrib/libarchive/tar/test/test_copy.c 358090 2020-02-19 01:51:44Z mm $");
27
28#if defined(__CYGWIN__)
29# include <limits.h>
30# include <sys/cygwin.h>
31#endif
32#if defined(_WIN32) && !defined(__CYGWIN__)
33# include <direct.h>
34#endif

--- 216 unchanged lines hidden (view full) ---

251 if (!assert(d != NULL))
252 continue;
253 while ((de = readdir(d)) != NULL) {
254 char *p = de->d_name;
255 if (p[0] == '.')
256 continue;
257 switch(dp[0]) {
258 case 'l': case 'm': case 'd':
27
28#if defined(__CYGWIN__)
29# include <limits.h>
30# include <sys/cygwin.h>
31#endif
32#if defined(_WIN32) && !defined(__CYGWIN__)
33# include <direct.h>
34#endif

--- 216 unchanged lines hidden (view full) ---

251 if (!assert(d != NULL))
252 continue;
253 while ((de = readdir(d)) != NULL) {
254 char *p = de->d_name;
255 if (p[0] == '.')
256 continue;
257 switch(dp[0]) {
258 case 'l': case 'm': case 'd':
259 failure("strlen(p)=%d", strlen(p));
259 failure("strlen(p)=%zu", strlen(p));
260 assert(strlen(p) < limit);
261 assertEqualString(p,
262 filenames[strlen(p)]);
263 break;
264 case 'f': case 's':
260 assert(strlen(p) < limit);
261 assertEqualString(p,
262 filenames[strlen(p)]);
263 break;
264 case 'f': case 's':
265 failure("strlen(p)=%d", strlen(p));
265 failure("strlen(p)=%zu", strlen(p));
266 assert(strlen(p) < limit + 1);
267 assertEqualString(p,
268 filenames[strlen(p)]);
269 break;
270 default:
271 failure("File %s shouldn't be here", p);
272 assert(0);
273 }

--- 102 unchanged lines hidden ---
266 assert(strlen(p) < limit + 1);
267 assertEqualString(p,
268 filenames[strlen(p)]);
269 break;
270 default:
271 failure("File %s shouldn't be here", p);
272 assert(0);
273 }

--- 102 unchanged lines hidden ---