diff options
| author | nulltoken <emeric.fermas@gmail.com> | 2010-12-10 16:30:06 +0100 |
|---|---|---|
| committer | nulltoken <emeric.fermas@gmail.com> | 2010-12-10 16:30:06 +0100 |
| commit | 13710f1e86d9048b88361092a94b4648aeb864fd (patch) | |
| tree | 488f4576ca32f58f235ac30e9299966def6e33f3 /tests/t0403-write.c | |
| parent | 2cd6d6866e45939c7a60ff5f4cca52b02c8af498 (diff) | |
| download | libgit2-13710f1e86d9048b88361092a94b4648aeb864fd.tar.gz | |
Added timezone offset parsing and outputting.
Diffstat (limited to 'tests/t0403-write.c')
| -rw-r--r-- | tests/t0403-write.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/t0403-write.c b/tests/t0403-write.c index 8b29b05ea..889c9e12f 100644 --- a/tests/t0403-write.c +++ b/tests/t0403-write.c @@ -42,8 +42,8 @@ BEGIN_TEST(writenew_test) git_commit_add_parent(commit, parent); /* Set other attributes */ - git_commit_set_committer(commit, COMMITTER_NAME, COMMITTER_EMAIL, 123456789); - git_commit_set_author(commit, COMMITTER_NAME, COMMITTER_EMAIL, 987654321); + git_commit_set_committer(commit, COMMITTER_NAME, COMMITTER_EMAIL, 123456789, 60); + git_commit_set_author(commit, COMMITTER_NAME, COMMITTER_EMAIL, 987654321, 90); git_commit_set_message(commit, COMMIT_MESSAGE); /* Check attributes were set correctly */ @@ -52,13 +52,16 @@ BEGIN_TEST(writenew_test) must_be_true(strcmp(author->name, COMMITTER_NAME) == 0); must_be_true(strcmp(author->email, COMMITTER_EMAIL) == 0); must_be_true(author->time == 987654321); + must_be_true(author->time_offset == 90); committer = git_commit_committer(commit); must_be_true(committer != NULL); must_be_true(strcmp(committer->name, COMMITTER_NAME) == 0); must_be_true(strcmp(committer->email, COMMITTER_EMAIL) == 0); must_be_true(committer->time == 123456789); + must_be_true(committer->time_offset == 60); must_be_true(git_commit_time(commit) == 123456789); + must_be_true(git_commit_time_offset(commit) == 60); must_be_true(strcmp(git_commit_message(commit), COMMIT_MESSAGE) == 0); |
