diff options
author | Edward Thomson <ethomson@microsoft.com> | 2015-03-31 16:06:33 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2015-05-04 07:18:29 -0500 |
commit | f286e2715d98e695462ca059de7a0206384ccbf1 (patch) | |
tree | 7ceb106d063c06ceb9d2a4f176c76ece5658aa7b | |
parent | 64842d8756512ff22efe41e020d7339b04328cf7 (diff) | |
download | libgit2-f286e2715d98e695462ca059de7a0206384ccbf1.tar.gz |
status test: always test the new file path
-rw-r--r-- | tests/status/renames.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/status/renames.c b/tests/status/renames.c index 24b8aca2b..f482d693a 100644 --- a/tests/status/renames.c +++ b/tests/status/renames.c @@ -73,16 +73,20 @@ static void check_status( cl_assert_equal_i_fmt(expected->status, actual->status, "%04x"); - if (oldname) - cl_assert(git__strcmp(oldname, expected->oldname) == 0); - else - cl_assert(expected->oldname == NULL); + if (expected->oldname) { + cl_assert(oldname != NULL); + cl_assert_equal_s(oldname, expected->oldname); + } else { + cl_assert(oldname == NULL); + } if (actual->status & (GIT_STATUS_INDEX_RENAMED|GIT_STATUS_WT_RENAMED)) { - if (newname) - cl_assert(git__strcmp(newname, expected->newname) == 0); - else - cl_assert(expected->newname == NULL); + if (expected->newname) { + cl_assert(newname != NULL); + cl_assert_equal_s(newname, expected->newname); + } else { + cl_assert(newname == NULL); + } } } } |