Skip to content

Commit 6727a25

Browse files
committed
Tabify indentations
1 parent 56f9ffa commit 6727a25

File tree

1 file changed

+82
-82
lines changed

1 file changed

+82
-82
lines changed

tests-clar/commit/parse.c

Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -7,77 +7,77 @@
77
static git_repository *g_repo;
88
void test_commit_parse__initialize(void)
99
{
10-
g_repo = cl_git_sandbox_init("testrepo");
10+
g_repo = cl_git_sandbox_init("testrepo");
1111
}
1212
void test_commit_parse__cleanup(void)
1313
{
14-
cl_git_sandbox_cleanup();
14+
cl_git_sandbox_cleanup();
1515
}
1616

1717

1818
// Header parsing
1919
typedef struct {
20-
const char *line;
21-
const char *header;
20+
const char *line;
21+
const char *header;
2222
} parse_test_case;
2323

2424
static parse_test_case passing_header_cases[] = {
25-
{ "parent 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "parent " },
26-
{ "tree 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "tree " },
27-
{ "random_heading 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "random_heading " },
28-
{ "stuck_heading05452d6349abcd67aa396dfb28660d765d8b2a36\n", "stuck_heading" },
29-
{ "tree 5F4BEFFC0759261D015AA63A3A85613FF2F235DE\n", "tree " },
30-
{ "tree 1A669B8AB81B5EB7D9DB69562D34952A38A9B504\n", "tree " },
31-
{ "tree 5B20DCC6110FCC75D31C6CEDEBD7F43ECA65B503\n", "tree " },
32-
{ "tree 173E7BF00EA5C33447E99E6C1255954A13026BE4\n", "tree " },
33-
{ NULL, NULL }
25+
{ "parent 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "parent " },
26+
{ "tree 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "tree " },
27+
{ "random_heading 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "random_heading " },
28+
{ "stuck_heading05452d6349abcd67aa396dfb28660d765d8b2a36\n", "stuck_heading" },
29+
{ "tree 5F4BEFFC0759261D015AA63A3A85613FF2F235DE\n", "tree " },
30+
{ "tree 1A669B8AB81B5EB7D9DB69562D34952A38A9B504\n", "tree " },
31+
{ "tree 5B20DCC6110FCC75D31C6CEDEBD7F43ECA65B503\n", "tree " },
32+
{ "tree 173E7BF00EA5C33447E99E6C1255954A13026BE4\n", "tree " },
33+
{ NULL, NULL }
3434
};
3535

3636
static parse_test_case failing_header_cases[] = {
37-
{ "parent 05452d6349abcd67aa396dfb28660d765d8b2a36", "parent " },
38-
{ "05452d6349abcd67aa396dfb28660d765d8b2a36\n", "tree " },
39-
{ "parent05452d6349abcd67aa396dfb28660d765d8b2a6a\n", "parent " },
40-
{ "parent 05452d6349abcd67aa396dfb280d765d8b2a6\n", "parent " },
41-
{ "tree 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "tree " },
42-
{ "parent 0545xd6349abcd67aa396dfb28660d765d8b2a36\n", "parent " },
43-
{ "parent 0545xd6349abcd67aa396dfb28660d765d8b2a36FF\n", "parent " },
44-
{ "", "tree " },
45-
{ "", "" },
46-
{ NULL, NULL }
37+
{ "parent 05452d6349abcd67aa396dfb28660d765d8b2a36", "parent " },
38+
{ "05452d6349abcd67aa396dfb28660d765d8b2a36\n", "tree " },
39+
{ "parent05452d6349abcd67aa396dfb28660d765d8b2a6a\n", "parent " },
40+
{ "parent 05452d6349abcd67aa396dfb280d765d8b2a6\n", "parent " },
41+
{ "tree 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "tree " },
42+
{ "parent 0545xd6349abcd67aa396dfb28660d765d8b2a36\n", "parent " },
43+
{ "parent 0545xd6349abcd67aa396dfb28660d765d8b2a36FF\n", "parent " },
44+
{ "", "tree " },
45+
{ "", "" },
46+
{ NULL, NULL }
4747
};
4848

4949
void test_commit_parse__header(void)
5050
{
51-
git_oid oid;
51+
git_oid oid;
5252

53-
parse_test_case *testcase;
54-
for (testcase = passing_header_cases; testcase->line != NULL; testcase++)
55-
{
56-
const char *line = testcase->line;
57-
const char *line_end = line + strlen(line);
53+
parse_test_case *testcase;
54+
for (testcase = passing_header_cases; testcase->line != NULL; testcase++)
55+
{
56+
const char *line = testcase->line;
57+
const char *line_end = line + strlen(line);
5858

59-
cl_git_pass(git_oid__parse(&oid, &line, line_end, testcase->header));
60-
cl_assert(line == line_end);
61-
}
59+
cl_git_pass(git_oid__parse(&oid, &line, line_end, testcase->header));
60+
cl_assert(line == line_end);
61+
}
6262

63-
for (testcase = failing_header_cases; testcase->line != NULL; testcase++)
64-
{
65-
const char *line = testcase->line;
66-
const char *line_end = line + strlen(line);
63+
for (testcase = failing_header_cases; testcase->line != NULL; testcase++)
64+
{
65+
const char *line = testcase->line;
66+
const char *line_end = line + strlen(line);
6767

68-
cl_git_fail(git_oid__parse(&oid, &line, line_end, testcase->header));
69-
}
68+
cl_git_fail(git_oid__parse(&oid, &line, line_end, testcase->header));
69+
}
7070
}
7171

7272

7373
// Signature parsing
7474
typedef struct {
75-
const char *string;
76-
const char *header;
77-
const char *name;
78-
const char *email;
79-
git_time_t time;
80-
int offset;
75+
const char *string;
76+
const char *header;
77+
const char *name;
78+
const char *email;
79+
git_time_t time;
80+
int offset;
8181
} passing_signature_test_case;
8282

8383
passing_signature_test_case passing_signature_cases[] = {
@@ -122,12 +122,12 @@ passing_signature_test_case passing_signature_cases[] = {
122122
{"author Vicent Marti <[email protected]> 4294967296 \n", "author ", "Vicent Marti", "[email protected]", 4294967296, 0},
123123
{"author Vicent Marti <[email protected]> 8589934592 \n", "author ", "Vicent Marti", "[email protected]", 8589934592, 0},
124124

125-
{NULL,NULL,NULL,NULL,0,0}
125+
{NULL,NULL,NULL,NULL,0,0}
126126
};
127127

128128
typedef struct {
129-
const char *string;
130-
const char *header;
129+
const char *string;
130+
const char *header;
131131
} failing_signature_test_case;
132132

133133
failing_signature_test_case failing_signature_cases[] = {
@@ -143,31 +143,31 @@ failing_signature_test_case failing_signature_cases[] = {
143143

144144
void test_commit_parse__signature(void)
145145
{
146-
passing_signature_test_case *passcase;
147-
failing_signature_test_case *failcase;
148-
149-
for (passcase = passing_signature_cases; passcase->string != NULL; passcase++)
150-
{
151-
const char *str = passcase->string;
152-
size_t len = strlen(passcase->string);
153-
struct git_signature person = {0};
154-
155-
cl_git_pass(git_signature__parse(&person, &str, str + len, passcase->header, '\n'));
156-
cl_assert_equal_s(passcase->name, person.name);
157-
cl_assert_equal_s(passcase->email, person.email);
158-
cl_assert_equal_i((int)passcase->time, (int)person.when.time);
159-
cl_assert_equal_i(passcase->offset, person.when.offset);
160-
git__free(person.name); git__free(person.email);
161-
}
162-
163-
for (failcase = failing_signature_cases; failcase->string != NULL; failcase++)
164-
{
165-
const char *str = failcase->string;
166-
size_t len = strlen(failcase->string);
167-
git_signature person = {0};
168-
cl_git_fail(git_signature__parse(&person, &str, str + len, failcase->header, '\n'));
169-
git__free(person.name); git__free(person.email);
170-
}
146+
passing_signature_test_case *passcase;
147+
failing_signature_test_case *failcase;
148+
149+
for (passcase = passing_signature_cases; passcase->string != NULL; passcase++)
150+
{
151+
const char *str = passcase->string;
152+
size_t len = strlen(passcase->string);
153+
struct git_signature person = {0};
154+
155+
cl_git_pass(git_signature__parse(&person, &str, str + len, passcase->header, '\n'));
156+
cl_assert_equal_s(passcase->name, person.name);
157+
cl_assert_equal_s(passcase->email, person.email);
158+
cl_assert_equal_i((int)passcase->time, (int)person.when.time);
159+
cl_assert_equal_i(passcase->offset, person.when.offset);
160+
git__free(person.name); git__free(person.email);
161+
}
162+
163+
for (failcase = failing_signature_cases; failcase->string != NULL; failcase++)
164+
{
165+
const char *str = failcase->string;
166+
size_t len = strlen(failcase->string);
167+
git_signature person = {0};
168+
cl_git_fail(git_signature__parse(&person, &str, str + len, failcase->header, '\n'));
169+
git__free(person.name); git__free(person.email);
170+
}
171171
}
172172

173173

@@ -312,17 +312,17 @@ void test_commit_parse__entire_commit(void)
312312

313313
// query the details on a parsed commit
314314
void test_commit_parse__details0(void) {
315-
static const char *commit_ids[] = {
316-
"a4a7dce85cf63874e984719f4fdd239f5145052f", /* 0 */
317-
"9fd738e8f7967c078dceed8190330fc8648ee56a", /* 1 */
318-
"4a202b346bb0fb0db7eff3cffeb3c70babbd2045", /* 2 */
319-
"c47800c7266a2be04c571c04d5a6614691ea99bd", /* 3 */
320-
"8496071c1b46c854b31185ea97743be6a8774479", /* 4 */
321-
"5b5b025afb0b4c913b4c338a42934a3863bf3644", /* 5 */
322-
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750", /* 6 */
323-
};
315+
static const char *commit_ids[] = {
316+
"a4a7dce85cf63874e984719f4fdd239f5145052f", /* 0 */
317+
"9fd738e8f7967c078dceed8190330fc8648ee56a", /* 1 */
318+
"4a202b346bb0fb0db7eff3cffeb3c70babbd2045", /* 2 */
319+
"c47800c7266a2be04c571c04d5a6614691ea99bd", /* 3 */
320+
"8496071c1b46c854b31185ea97743be6a8774479", /* 4 */
321+
"5b5b025afb0b4c913b4c338a42934a3863bf3644", /* 5 */
322+
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750", /* 6 */
323+
};
324324
const size_t commit_count = sizeof(commit_ids) / sizeof(const char *);
325-
unsigned int i;
325+
unsigned int i;
326326

327327
for (i = 0; i < commit_count; ++i) {
328328
git_oid id;

0 commit comments

Comments
 (0)