@@ -84,6 +84,15 @@ def test_symlink_dir(inwd):
84
84
})
85
85
86
86
87
+ @pytest .mark .skipif (sys .platform == 'win32' ,
88
+ reason = "symlinks to dir not supported" )
89
+ def test_symlink_dir_source_not_in_scm (inwd ):
90
+ (inwd .cwd / 'adir' / 'bdirlink' ).mksymlinkto ('../bdir' )
91
+ assert set (find_files ('adir' )) == _sep ({
92
+ 'adir/filea' ,
93
+ })
94
+
95
+
87
96
@pytest .mark .skipif (sys .platform == 'win32' ,
88
97
reason = "symlinks to files not supported on windows" )
89
98
def test_symlink_file (inwd ):
@@ -95,6 +104,15 @@ def test_symlink_file(inwd):
95
104
})
96
105
97
106
107
+ @pytest .mark .skipif (sys .platform == 'win32' ,
108
+ reason = "symlinks to files not supported on windows" )
109
+ def test_symlink_file_source_not_in_scm (inwd ):
110
+ (inwd .cwd / 'adir' / 'file1link' ).mksymlinkto ('../file1' )
111
+ assert set (find_files ('adir' )) == _sep ({
112
+ 'adir/filea' ,
113
+ })
114
+
115
+
98
116
@pytest .mark .skipif (sys .platform == 'win32' ,
99
117
reason = "symlinks to dir not supported" )
100
118
def test_symlink_loop (inwd ):
@@ -106,6 +124,18 @@ def test_symlink_loop(inwd):
106
124
})
107
125
108
126
127
+ @pytest .mark .skipif (sys .platform == 'win32' ,
128
+ reason = "symlinks to dir not supported" )
129
+ def test_symlink_loop_outside_path (inwd ):
130
+ (inwd .cwd / 'bdir' / 'loop' ).mksymlinkto ('../bdir' )
131
+ (inwd .cwd / 'adir' / 'bdirlink' ).mksymlinkto ('../bdir' )
132
+ inwd .add_and_commit ()
133
+ assert set (find_files ('adir' )) == _sep ({
134
+ 'adir/filea' ,
135
+ 'adir/bdirlink/fileb' ,
136
+ })
137
+
138
+
109
139
@pytest .mark .skipif (sys .platform == 'win32' ,
110
140
reason = "symlinks to dir not supported" )
111
141
def test_symlink_dir_out_of_git (inwd ):
0 commit comments