From 157f59d44a4077394dcdd97ceea73e3fd57741f6 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 5 Aug 2015 11:09:27 +0200 Subject: [PATCH] Csync tests: fix on linux Linux do not iconv to decode filenames --- csync/tests/vio_tests/check_vio_ext.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/csync/tests/vio_tests/check_vio_ext.c b/csync/tests/vio_tests/check_vio_ext.c index 638df6571d..fbc7ad9f39 100644 --- a/csync/tests/vio_tests/check_vio_ext.c +++ b/csync/tests/vio_tests/check_vio_ext.c @@ -445,12 +445,19 @@ static void check_readdir_bigunicode(void **state) int files_cnt = 0; traverse_dir(state, CSYNC_TEST_DIR, &files_cnt); - // Only the directory with good name is returned assert_string_equal( sv->result, " C:/tmp/csync_test/goodone" +#ifndef __APPLE__ + // On Mac, iconv will not return some files with fancy unicode. + // Linux is not so picky about it and return everything and let the sync engine deal with it. + " C:/tmp/csync_test/goodone/ugly\xEF\xBB\xBF\x32" ".txt" +#endif ); + +#ifdef __APPLE__ // Bad one is recognized though.. ! assert_string_equal( sv->ignored_dir, CSYNC_TEST_DIR "/goodone/" "ugly\xEF\xBB\xBF\x32" ".txt"); +#endif assert_int_equal(files_cnt, 0); }