We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c59d519 + 5c1d764 commit 7445d51Copy full SHA for 7445d51
tests/util/path.c
@@ -2,6 +2,10 @@
2
#include "futils.h"
3
#include "fs_path.h"
4
5
+#ifndef GIT_WIN32
6
+# include <unistd.h>
7
+#endif
8
+
9
static char *path_save;
10
11
void test_path__initialize(void)
@@ -757,7 +761,7 @@ void test_path__validate_current_user_ownership(void)
757
761
cl_git_fail(git_fs_path_owner_is_current_user(&is_cur, "c:\\path\\does\\not\\exist"));
758
762
#else
759
763
cl_git_pass(git_fs_path_owner_is_current_user(&is_cur, "/"));
760
- cl_assert_equal_i(is_cur, 0);
764
+ cl_assert_equal_i(is_cur, (geteuid() == 0));
765
766
cl_git_fail(git_fs_path_owner_is_current_user(&is_cur, "/path/does/not/exist"));
767
#endif
0 commit comments