Commit 8533c80d by Edward Thomson

repo tests: ensure core.symlinks is set correctly

Ensure that `core.symlinks` is set correctly.  By default, it is unset,
but it is explicitly set to `false` if the platform was detected to not
support symlinks during repository initialization.
parent 204cce66
...@@ -247,6 +247,19 @@ void test_repo_init__detect_ignorecase(void) ...@@ -247,6 +247,19 @@ void test_repo_init__detect_ignorecase(void)
"core.ignorecase", found_without_match ? true : GIT_ENOTFOUND); "core.ignorecase", found_without_match ? true : GIT_ENOTFOUND);
} }
void test_repo_init__detect_symlinks(void)
{
struct stat st;
bool no_symlinks;
no_symlinks = (p_symlink("target", "link") < 0 ||
p_lstat("link", &st) < 0 ||
! (S_ISLNK(st.st_mode)));
assert_config_entry_on_init(
"core.symlinks", no_symlinks ? false : GIT_ENOTFOUND);
}
void test_repo_init__detect_precompose_unicode_required(void) void test_repo_init__detect_precompose_unicode_required(void)
{ {
#ifdef GIT_USE_ICONV #ifdef GIT_USE_ICONV
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment