@@ -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 ):
@@ -149,7 +179,7 @@ def test_empty_subdir(inwd):
149
179
150
180
151
181
@pytest .mark .skipif (sys .platform == 'win32' ,
152
- reason = "symlinks to files not supported on windows" )
182
+ reason = "symlinks not supported on windows" )
153
183
def test_double_include_through_symlink (inwd ):
154
184
(inwd .cwd / 'data' ).ensure (dir = True )
155
185
(inwd .cwd / 'data' / 'datafile' ).ensure (file = True )
@@ -167,7 +197,7 @@ def test_double_include_through_symlink(inwd):
167
197
168
198
169
199
@pytest .mark .skipif (sys .platform == 'win32' ,
170
- reason = "symlinks to files not supported on windows" )
200
+ reason = "symlinks not supported on windows" )
171
201
def test_symlink_not_in_scm_while_target_is (inwd ):
172
202
(inwd .cwd / 'data' ).ensure (dir = True )
173
203
(inwd .cwd / 'data' / 'datafile' ).ensure (file = True )
0 commit comments