Deleted Added
full compact
test_option_grzip.c (302408) test_option_grzip.c (318482)
1/*-
2 * Copyright (c) 2003-2007 Tim Kientzle
3 * Copyright (c) 2012 Michihiro NAKAJIMA
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

39 /* Create a file. */
40 assertMakeFile("f", 0644, "a");
41
42 /* Archive it with grzip compression. */
43 assertEqualInt(0,
44 systemf("echo f | %s -o --grzip >archive.out 2>archive.err",
45 testprog));
46 p = slurpfile(&s, "archive.err");
1/*-
2 * Copyright (c) 2003-2007 Tim Kientzle
3 * Copyright (c) 2012 Michihiro NAKAJIMA
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

39 /* Create a file. */
40 assertMakeFile("f", 0644, "a");
41
42 /* Archive it with grzip compression. */
43 assertEqualInt(0,
44 systemf("echo f | %s -o --grzip >archive.out 2>archive.err",
45 testprog));
46 p = slurpfile(&s, "archive.err");
47 p[s] = '\0';
47 free(p);
48 /* Check that the archive file has an grzip signature. */
49 p = slurpfile(&s, "archive.out");
50 assert(s > 2);
51 assertEqualMem(p, "GRZipII\x00\x02\x04:)", 12);
48 /* Check that the archive file has an grzip signature. */
49 p = slurpfile(&s, "archive.out");
50 assert(s > 2);
51 assertEqualMem(p, "GRZipII\x00\x02\x04:)", 12);
52 free(p);
52}
53}