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
163db8f2
Commit
163db8f2
authored
5 years ago
by
Patrick Steinhardt
Committed by
Edward Thomson
5 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32: test relative symlinks
Ensure that we don't canonicalize symlink targets.
parent
43d7a42b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
tests/core/posix.c
+20
-0
No files found.
tests/core/posix.c
View file @
163db8f2
...
...
@@ -190,6 +190,26 @@ void test_core_posix__symlink_resolves_to_correct_type(void)
git_buf_dispose
(
&
contents
);
}
void
test_core_posix__relative_symlink
(
void
)
{
git_buf
contents
=
GIT_BUF_INIT
;
if
(
!
git_path_supports_symlinks
(
clar_sandbox_path
()))
clar__skip
();
cl_must_pass
(
git_futils_mkdir
(
"dir"
,
0777
,
0
));
cl_git_mkfile
(
"file"
,
"contents"
);
cl_git_pass
(
p_symlink
(
"../file"
,
"dir/link"
));
cl_git_pass
(
git_futils_readbuffer
(
&
contents
,
"dir/link"
));
cl_assert_equal_s
(
contents
.
ptr
,
"contents"
);
cl_must_pass
(
p_unlink
(
"file"
));
cl_must_pass
(
p_unlink
(
"dir/link"
));
cl_must_pass
(
p_rmdir
(
"dir"
));
git_buf_dispose
(
&
contents
);
}
void
test_core_posix__symlink_to_file_across_dirs
(
void
)
{
git_buf
contents
=
GIT_BUF_INIT
;
...
...
This diff is collapsed.
Click to expand it.
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