diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2018-05-22 15:21:08 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2018-05-22 15:27:29 +0200 |
| commit | 02c80ad75d3c3d2246f4f36660281d73648d79aa (patch) | |
| tree | e40e8faae52cf68882b1c527a9dc97804854e56f /tests/path | |
| parent | a145f2b642e41dec3522dc449a2ef947ccd7a337 (diff) | |
| download | libgit2-02c80ad75d3c3d2246f4f36660281d73648d79aa.tar.gz | |
path: accept the name length as a parameter
We may take in names from the middle of a string so we want the caller to let us
know how long the path component is that we should be checking.
Diffstat (limited to 'tests/path')
| -rw-r--r-- | tests/path/dotgit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/path/dotgit.c b/tests/path/dotgit.c index 7a011d4f6..038e849c2 100644 --- a/tests/path/dotgit.c +++ b/tests/path/dotgit.c @@ -90,18 +90,18 @@ static char *gitmodules_not_altnames[] = { void test_path_dotgit__dotgit_modules(void) { size_t i; - cl_assert_equal_i(1, git_path_is_dotgit_modules(".gitmodules")); - cl_assert_equal_i(1, git_path_is_dotgit_modules(".git\xe2\x80\x8cmodules")); + cl_assert_equal_i(1, git_path_is_dotgit_modules(".gitmodules", strlen(".gitmodules"))); + cl_assert_equal_i(1, git_path_is_dotgit_modules(".git\xe2\x80\x8cmodules", strlen(".git\xe2\x80\x8cmodules"))); for (i = 0; i < ARRAY_SIZE(gitmodules_altnames); i++) { const char *name = gitmodules_altnames[i]; - if (!git_path_is_dotgit_modules(name)) + if (!git_path_is_dotgit_modules(name, strlen(name))) cl_fail(name); } for (i = 0; i < ARRAY_SIZE(gitmodules_not_altnames); i++) { const char *name = gitmodules_not_altnames[i]; - if (git_path_is_dotgit_modules(name)) + if (git_path_is_dotgit_modules(name, strlen(name))) cl_fail(name); } |
