File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,26 @@ void test_core_posix__symlink_resolves_to_correct_type(void)
190
190
git_buf_dispose (& contents );
191
191
}
192
192
193
+ void test_core_posix__relative_symlink (void )
194
+ {
195
+ git_buf contents = GIT_BUF_INIT ;
196
+
197
+ if (!git_path_supports_symlinks (clar_sandbox_path ()))
198
+ clar__skip ();
199
+
200
+ cl_must_pass (git_futils_mkdir ("dir" , 0777 , 0 ));
201
+ cl_git_mkfile ("file" , "contents" );
202
+ cl_git_pass (p_symlink ("../file" , "dir/link" ));
203
+ cl_git_pass (git_futils_readbuffer (& contents , "dir/link" ));
204
+ cl_assert_equal_s (contents .ptr , "contents" );
205
+
206
+ cl_must_pass (p_unlink ("file" ));
207
+ cl_must_pass (p_unlink ("dir/link" ));
208
+ cl_must_pass (p_rmdir ("dir" ));
209
+
210
+ git_buf_dispose (& contents );
211
+ }
212
+
193
213
void test_core_posix__symlink_to_file_across_dirs (void )
194
214
{
195
215
git_buf contents = GIT_BUF_INIT ;
You can’t perform that action at this time.
0 commit comments