summaryrefslogtreecommitdiff
path: root/tests/tar_gnu.c
blob: b21c28328ce82193c961d237baa2611c72a9039c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* SPDX-License-Identifier: GPL-3.0-or-later */
/*
 * tar_gnu.c
 *
 * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
 */
#include "test_tar.h"

static const char *filename =
"012345678901234567890123456789/012345678901234567890123456789/"
"012345678901234567890123456789/012345678901234567890123456789/"
"012345678901234567890123456789/input.txt";

int main(void)
{
	TEST_ASSERT(chdir(TEST_PATH) == 0);

	testcase_simple("format-acceptance/gnu.tar", 1542905892,
			1000, 1000, "input.txt");
	testcase_simple("format-acceptance/gnu-g.tar", 013375560044,
			1000, 1000, "input.txt");
	testcase_simple("user-group-largenum/gnu.tar", 013376036700,
			0x80000000, 0x80000000, "input.txt");
	testcase_simple("negative-mtime/gnu.tar", -315622800,
			1000, 1000, "input.txt");
	testcase_simple("long-paths/gnu.tar", 1542909670,
			1000, 1000, filename);
	testcase_simple("large-mtime/gnu.tar", 8589934592L,
			1000, 1000, "input.txt");
	test_case_file_size("file-size/gnu.tar");
	return EXIT_SUCCESS;
}