Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
407f2e9f
Commit
407f2e9f
authored
May 24, 2016
by
François Revol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: Fix stat() test to mask out unwanted bits
Haiku and Hurd both pass extra bits in struct stat::st_mode.
parent
c756448c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
tests/checkout/index.c
+3
-2
No files found.
tests/checkout/index.c
View file @
407f2e9f
...
...
@@ -294,11 +294,12 @@ void test_checkout_index__options_dir_modes(void)
(
void
)
p_umask
(
um
=
p_umask
(
022
));
cl_git_pass
(
p_stat
(
"./testrepo/a"
,
&
st
));
cl_assert_equal_i_fmt
(
st
.
st_mode
,
(
GIT_FILEMODE_TREE
|
0701
)
&
~
um
,
"%07o"
);
/* Haiku & Hurd use other mode bits, so we must mask them out */
cl_assert_equal_i_fmt
(
st
.
st_mode
&
(
S_IFMT
|
07777
),
(
GIT_FILEMODE_TREE
|
0701
)
&
~
um
,
"%07o"
);
/* File-mode test, since we're on the 'dir' branch */
cl_git_pass
(
p_stat
(
"./testrepo/a/b.txt"
,
&
st
));
cl_assert_equal_i_fmt
(
st
.
st_mode
,
GIT_FILEMODE_BLOB_EXECUTABLE
&
~
um
,
"%07o"
);
cl_assert_equal_i_fmt
(
st
.
st_mode
&
(
S_IFMT
|
07777
)
,
GIT_FILEMODE_BLOB_EXECUTABLE
&
~
um
,
"%07o"
);
git_commit_free
(
commit
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment