Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/core/iconv.c')
-rw-r--r--tests/core/iconv.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/core/iconv.c b/tests/core/iconv.c
index 8aedab206..cb85f458a 100644
--- a/tests/core/iconv.c
+++ b/tests/core/iconv.c
@@ -39,8 +39,9 @@ void test_core_iconv__decomposed_to_precomposed(void)
{
#ifdef GIT_USE_ICONV
char *data = nfd;
- size_t datalen = strlen(nfd);
+ size_t datalen, nfdlen = strlen(nfd);
+ datalen = nfdlen;
cl_git_pass(git_path_iconv(&ic, &data, &datalen));
GIT_UNUSED(datalen);
@@ -48,6 +49,15 @@ void test_core_iconv__decomposed_to_precomposed(void)
* (on platforms where iconv is enabled, of course).
*/
cl_assert_equal_s(nfc, data);
+
+ /* should be able to do it multiple times with the same git_path_iconv_t */
+ data = nfd; datalen = nfdlen;
+ cl_git_pass(git_path_iconv(&ic, &data, &datalen));
+ cl_assert_equal_s(nfc, data);
+
+ data = nfd; datalen = nfdlen;
+ cl_git_pass(git_path_iconv(&ic, &data, &datalen));
+ cl_assert_equal_s(nfc, data);
#endif
}