summaryrefslogtreecommitdiff
path: root/tests-clar
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-09-30 16:13:53 -0700
committerRussell Belfer <rb@github.com>2013-10-03 10:44:13 -0700
commit6b7991e264b2fb0448e3dc47f972bafabf38c1fa (patch)
treedce9bd0d6076339f73c3cd74bd6abc8f7aeac5b2 /tests-clar
parent146b4d1c5f98aa14df086503f996d131d40b92f8 (diff)
downloadlibgit2-6b7991e264b2fb0448e3dc47f972bafabf38c1fa.tar.gz
Add check if we need to precompose unicode on Mac
This adds initialization of core.precomposeunicode to repo init on Mac. This is necessary because when a Mac accesses a repo on a VFAT or SAMBA file system, it will return directory entries in decomposed unicode even if the filesystem entry is precomposed. This also removes caching of a number of repo properties from the repo init pipeline because these are properties of the specific filesystem on which the repo is created, not of the system as a whole.
Diffstat (limited to 'tests-clar')
-rw-r--r--tests-clar/repo/init.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests-clar/repo/init.c b/tests-clar/repo/init.c
index 392be205b..6f3c84175 100644
--- a/tests-clar/repo/init.c
+++ b/tests-clar/repo/init.c
@@ -241,6 +241,16 @@ void test_repo_init__detect_ignorecase(void)
#endif
}
+void test_repo_init__detect_precompose_unicode_required(void)
+{
+#ifdef __APPLE__
+ /* hard to test "true" case without SAMBA or VFAT file system available */
+ assert_config_entry_on_init("core.precomposeunicode", false);
+#else
+ assert_config_entry_on_init("core.precomposeunicode", GIT_ENOTFOUND);
+#endif
+}
+
void test_repo_init__reinit_doesnot_overwrite_ignorecase(void)
{
git_config *config;