diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2016-05-25 15:35:39 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2016-05-25 15:35:39 +0200 |
| commit | 3978ab2ce86e75e02340a02842e8338a84341181 (patch) | |
| tree | d8c6f24ebc3429dd3a52fb992e2c9f84aa60d03e | |
| parent | a2cb47130ec7662811fe3447f69bae3f176e0362 (diff) | |
| download | libgit2-3978ab2ce86e75e02340a02842e8338a84341181.tar.gz | |
tree: provide some unsorted inputs for the tree updater
This makes sure we exercise the sorting that we need to do on the
inputs.
| -rw-r--r-- | tests/object/tree/update.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/object/tree/update.c b/tests/object/tree/update.c index 54c4335f5..b38646a5a 100644 --- a/tests/object/tree/update.c +++ b/tests/object/tree/update.c @@ -147,8 +147,9 @@ void test_object_tree_update__add_blobs(void) git_index_entry entry = { {0} }; int i; const char *paths[] = { - "some/deep/path", "some/other/path", + "some/deep/path", + "some/other/deep/path", "a/path/elsewhere", }; @@ -156,6 +157,7 @@ void test_object_tree_update__add_blobs(void) { GIT_TREE_UPDATE_UPSERT, {{0}}, GIT_FILEMODE_BLOB, paths[0]}, { GIT_TREE_UPDATE_UPSERT, {{0}}, GIT_FILEMODE_BLOB, paths[1]}, { GIT_TREE_UPDATE_UPSERT, {{0}}, GIT_FILEMODE_BLOB, paths[2]}, + { GIT_TREE_UPDATE_UPSERT, {{0}}, GIT_FILEMODE_BLOB, paths[3]}, }; cl_git_pass(git_oid_fromstr(&base_id, "c4dc1555e4d4fa0e0c9c3fc46734c7c35b3ce90b")); @@ -179,7 +181,7 @@ void test_object_tree_update__add_blobs(void) cl_git_pass(git_index_read_tree(idx, base_tree)); } - for (j = 0; j < 3; j++) { + for (j = 0; j < 4; j++) { entry.path = paths[j]; cl_git_pass(git_index_add(idx, &entry)); } |
