Tabify indentations
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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
diff --git a/tests-clar/commit/parse.c b/tests-clar/commit/parse.c
index 415860a..e91815d 100644
--- a/tests-clar/commit/parse.c
+++ b/tests-clar/commit/parse.c
@@ -7,77 +7,77 @@
static git_repository *g_repo;
void test_commit_parse__initialize(void)
{
- g_repo = cl_git_sandbox_init("testrepo");
+ g_repo = cl_git_sandbox_init("testrepo");
}
void test_commit_parse__cleanup(void)
{
- cl_git_sandbox_cleanup();
+ cl_git_sandbox_cleanup();
}
// Header parsing
typedef struct {
- const char *line;
- const char *header;
+ const char *line;
+ const char *header;
} parse_test_case;
static parse_test_case passing_header_cases[] = {
- { "parent 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "parent " },
- { "tree 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "tree " },
- { "random_heading 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "random_heading " },
- { "stuck_heading05452d6349abcd67aa396dfb28660d765d8b2a36\n", "stuck_heading" },
- { "tree 5F4BEFFC0759261D015AA63A3A85613FF2F235DE\n", "tree " },
- { "tree 1A669B8AB81B5EB7D9DB69562D34952A38A9B504\n", "tree " },
- { "tree 5B20DCC6110FCC75D31C6CEDEBD7F43ECA65B503\n", "tree " },
- { "tree 173E7BF00EA5C33447E99E6C1255954A13026BE4\n", "tree " },
- { NULL, NULL }
+ { "parent 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "parent " },
+ { "tree 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "tree " },
+ { "random_heading 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "random_heading " },
+ { "stuck_heading05452d6349abcd67aa396dfb28660d765d8b2a36\n", "stuck_heading" },
+ { "tree 5F4BEFFC0759261D015AA63A3A85613FF2F235DE\n", "tree " },
+ { "tree 1A669B8AB81B5EB7D9DB69562D34952A38A9B504\n", "tree " },
+ { "tree 5B20DCC6110FCC75D31C6CEDEBD7F43ECA65B503\n", "tree " },
+ { "tree 173E7BF00EA5C33447E99E6C1255954A13026BE4\n", "tree " },
+ { NULL, NULL }
};
static parse_test_case failing_header_cases[] = {
- { "parent 05452d6349abcd67aa396dfb28660d765d8b2a36", "parent " },
- { "05452d6349abcd67aa396dfb28660d765d8b2a36\n", "tree " },
- { "parent05452d6349abcd67aa396dfb28660d765d8b2a6a\n", "parent " },
- { "parent 05452d6349abcd67aa396dfb280d765d8b2a6\n", "parent " },
- { "tree 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "tree " },
- { "parent 0545xd6349abcd67aa396dfb28660d765d8b2a36\n", "parent " },
- { "parent 0545xd6349abcd67aa396dfb28660d765d8b2a36FF\n", "parent " },
- { "", "tree " },
- { "", "" },
- { NULL, NULL }
+ { "parent 05452d6349abcd67aa396dfb28660d765d8b2a36", "parent " },
+ { "05452d6349abcd67aa396dfb28660d765d8b2a36\n", "tree " },
+ { "parent05452d6349abcd67aa396dfb28660d765d8b2a6a\n", "parent " },
+ { "parent 05452d6349abcd67aa396dfb280d765d8b2a6\n", "parent " },
+ { "tree 05452d6349abcd67aa396dfb28660d765d8b2a36\n", "tree " },
+ { "parent 0545xd6349abcd67aa396dfb28660d765d8b2a36\n", "parent " },
+ { "parent 0545xd6349abcd67aa396dfb28660d765d8b2a36FF\n", "parent " },
+ { "", "tree " },
+ { "", "" },
+ { NULL, NULL }
};
void test_commit_parse__header(void)
{
- git_oid oid;
+ git_oid oid;
- parse_test_case *testcase;
- for (testcase = passing_header_cases; testcase->line != NULL; testcase++)
- {
- const char *line = testcase->line;
- const char *line_end = line + strlen(line);
+ parse_test_case *testcase;
+ for (testcase = passing_header_cases; testcase->line != NULL; testcase++)
+ {
+ const char *line = testcase->line;
+ const char *line_end = line + strlen(line);
- cl_git_pass(git_oid__parse(&oid, &line, line_end, testcase->header));
- cl_assert(line == line_end);
- }
+ cl_git_pass(git_oid__parse(&oid, &line, line_end, testcase->header));
+ cl_assert(line == line_end);
+ }
- for (testcase = failing_header_cases; testcase->line != NULL; testcase++)
- {
- const char *line = testcase->line;
- const char *line_end = line + strlen(line);
+ for (testcase = failing_header_cases; testcase->line != NULL; testcase++)
+ {
+ const char *line = testcase->line;
+ const char *line_end = line + strlen(line);
- cl_git_fail(git_oid__parse(&oid, &line, line_end, testcase->header));
- }
+ cl_git_fail(git_oid__parse(&oid, &line, line_end, testcase->header));
+ }
}
// Signature parsing
typedef struct {
- const char *string;
- const char *header;
- const char *name;
- const char *email;
- git_time_t time;
- int offset;
+ const char *string;
+ const char *header;
+ const char *name;
+ const char *email;
+ git_time_t time;
+ int offset;
} passing_signature_test_case;
passing_signature_test_case passing_signature_cases[] = {
@@ -122,12 +122,12 @@ passing_signature_test_case passing_signature_cases[] = {
{"author Vicent Marti <tanoku@gmail.com> 4294967296 \n", "author ", "Vicent Marti", "tanoku@gmail.com", 4294967296, 0},
{"author Vicent Marti <tanoku@gmail.com> 8589934592 \n", "author ", "Vicent Marti", "tanoku@gmail.com", 8589934592, 0},
- {NULL,NULL,NULL,NULL,0,0}
+ {NULL,NULL,NULL,NULL,0,0}
};
typedef struct {
- const char *string;
- const char *header;
+ const char *string;
+ const char *header;
} failing_signature_test_case;
failing_signature_test_case failing_signature_cases[] = {
@@ -143,31 +143,31 @@ failing_signature_test_case failing_signature_cases[] = {
void test_commit_parse__signature(void)
{
- passing_signature_test_case *passcase;
- failing_signature_test_case *failcase;
-
- for (passcase = passing_signature_cases; passcase->string != NULL; passcase++)
- {
- const char *str = passcase->string;
- size_t len = strlen(passcase->string);
- struct git_signature person = {0};
-
- cl_git_pass(git_signature__parse(&person, &str, str + len, passcase->header, '\n'));
- cl_assert_equal_s(passcase->name, person.name);
- cl_assert_equal_s(passcase->email, person.email);
- cl_assert_equal_i((int)passcase->time, (int)person.when.time);
- cl_assert_equal_i(passcase->offset, person.when.offset);
- git__free(person.name); git__free(person.email);
- }
-
- for (failcase = failing_signature_cases; failcase->string != NULL; failcase++)
- {
- const char *str = failcase->string;
- size_t len = strlen(failcase->string);
- git_signature person = {0};
- cl_git_fail(git_signature__parse(&person, &str, str + len, failcase->header, '\n'));
- git__free(person.name); git__free(person.email);
- }
+ passing_signature_test_case *passcase;
+ failing_signature_test_case *failcase;
+
+ for (passcase = passing_signature_cases; passcase->string != NULL; passcase++)
+ {
+ const char *str = passcase->string;
+ size_t len = strlen(passcase->string);
+ struct git_signature person = {0};
+
+ cl_git_pass(git_signature__parse(&person, &str, str + len, passcase->header, '\n'));
+ cl_assert_equal_s(passcase->name, person.name);
+ cl_assert_equal_s(passcase->email, person.email);
+ cl_assert_equal_i((int)passcase->time, (int)person.when.time);
+ cl_assert_equal_i(passcase->offset, person.when.offset);
+ git__free(person.name); git__free(person.email);
+ }
+
+ for (failcase = failing_signature_cases; failcase->string != NULL; failcase++)
+ {
+ const char *str = failcase->string;
+ size_t len = strlen(failcase->string);
+ git_signature person = {0};
+ cl_git_fail(git_signature__parse(&person, &str, str + len, failcase->header, '\n'));
+ git__free(person.name); git__free(person.email);
+ }
}
@@ -312,17 +312,17 @@ void test_commit_parse__entire_commit(void)
// query the details on a parsed commit
void test_commit_parse__details0(void) {
- static const char *commit_ids[] = {
- "a4a7dce85cf63874e984719f4fdd239f5145052f", /* 0 */
- "9fd738e8f7967c078dceed8190330fc8648ee56a", /* 1 */
- "4a202b346bb0fb0db7eff3cffeb3c70babbd2045", /* 2 */
- "c47800c7266a2be04c571c04d5a6614691ea99bd", /* 3 */
- "8496071c1b46c854b31185ea97743be6a8774479", /* 4 */
- "5b5b025afb0b4c913b4c338a42934a3863bf3644", /* 5 */
- "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", /* 6 */
- };
+ static const char *commit_ids[] = {
+ "a4a7dce85cf63874e984719f4fdd239f5145052f", /* 0 */
+ "9fd738e8f7967c078dceed8190330fc8648ee56a", /* 1 */
+ "4a202b346bb0fb0db7eff3cffeb3c70babbd2045", /* 2 */
+ "c47800c7266a2be04c571c04d5a6614691ea99bd", /* 3 */
+ "8496071c1b46c854b31185ea97743be6a8774479", /* 4 */
+ "5b5b025afb0b4c913b4c338a42934a3863bf3644", /* 5 */
+ "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", /* 6 */
+ };
const size_t commit_count = sizeof(commit_ids) / sizeof(const char *);
- unsigned int i;
+ unsigned int i;
for (i = 0; i < commit_count; ++i) {
git_oid id;