Unverified Commit 7445d510 by Edward Thomson Committed by GitHub

Merge pull request #6513 from libgit2/ethomson/util_test_root

fs_path: let root run the ownership tests
parents c59d519c 5c1d7649
......@@ -2,6 +2,10 @@
#include "futils.h"
#include "fs_path.h"
#ifndef GIT_WIN32
# include <unistd.h>
#endif
static char *path_save;
void test_path__initialize(void)
......@@ -757,7 +761,7 @@ void test_path__validate_current_user_ownership(void)
cl_git_fail(git_fs_path_owner_is_current_user(&is_cur, "c:\\path\\does\\not\\exist"));
#else
cl_git_pass(git_fs_path_owner_is_current_user(&is_cur, "/"));
cl_assert_equal_i(is_cur, 0);
cl_assert_equal_i(is_cur, (geteuid() == 0));
cl_git_fail(git_fs_path_owner_is_current_user(&is_cur, "/path/does/not/exist"));
#endif
......
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