@@ -3,6 +3,7 @@ package test
3
3
import (
4
4
"io/ioutil"
5
5
"os"
6
+ "runtime"
6
7
7
8
. "gopkg.in/check.v1"
8
9
. "gopkg.in/src-d/go-billy.v4"
@@ -19,6 +20,9 @@ type SymlinkSuite struct {
19
20
}
20
21
21
22
func (s * SymlinkSuite ) TestSymlink (c * C ) {
23
+ if runtime .GOOS == "plan9" {
24
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
25
+ }
22
26
err := util .WriteFile (s .FS , "file" , nil , 0644 )
23
27
c .Assert (err , IsNil )
24
28
@@ -31,6 +35,9 @@ func (s *SymlinkSuite) TestSymlink(c *C) {
31
35
}
32
36
33
37
func (s * SymlinkSuite ) TestSymlinkCrossDirs (c * C ) {
38
+ if runtime .GOOS == "plan9" {
39
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
40
+ }
34
41
err := util .WriteFile (s .FS , "foo/file" , nil , 0644 )
35
42
c .Assert (err , IsNil )
36
43
@@ -43,6 +50,9 @@ func (s *SymlinkSuite) TestSymlinkCrossDirs(c *C) {
43
50
}
44
51
45
52
func (s * SymlinkSuite ) TestSymlinkNested (c * C ) {
53
+ if runtime .GOOS == "plan9" {
54
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
55
+ }
46
56
err := util .WriteFile (s .FS , "file" , []byte ("hello world!" ), 0644 )
47
57
c .Assert (err , IsNil )
48
58
@@ -59,6 +69,9 @@ func (s *SymlinkSuite) TestSymlinkNested(c *C) {
59
69
}
60
70
61
71
func (s * SymlinkSuite ) TestSymlinkWithNonExistentdTarget (c * C ) {
72
+ if runtime .GOOS == "plan9" {
73
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
74
+ }
62
75
err := s .FS .Symlink ("file" , "link" )
63
76
c .Assert (err , IsNil )
64
77
@@ -67,6 +80,9 @@ func (s *SymlinkSuite) TestSymlinkWithNonExistentdTarget(c *C) {
67
80
}
68
81
69
82
func (s * SymlinkSuite ) TestSymlinkWithExistingLink (c * C ) {
83
+ if runtime .GOOS == "plan9" {
84
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
85
+ }
70
86
err := util .WriteFile (s .FS , "link" , nil , 0644 )
71
87
c .Assert (err , IsNil )
72
88
@@ -75,6 +91,9 @@ func (s *SymlinkSuite) TestSymlinkWithExistingLink(c *C) {
75
91
}
76
92
77
93
func (s * SymlinkSuite ) TestOpenWithSymlinkToRelativePath (c * C ) {
94
+ if runtime .GOOS == "plan9" {
95
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
96
+ }
78
97
err := util .WriteFile (s .FS , "dir/file" , []byte ("foo" ), 0644 )
79
98
c .Assert (err , IsNil )
80
99
@@ -91,6 +110,9 @@ func (s *SymlinkSuite) TestOpenWithSymlinkToRelativePath(c *C) {
91
110
}
92
111
93
112
func (s * SymlinkSuite ) TestOpenWithSymlinkToAbsolutePath (c * C ) {
113
+ if runtime .GOOS == "plan9" {
114
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
115
+ }
94
116
err := util .WriteFile (s .FS , "dir/file" , []byte ("foo" ), 0644 )
95
117
c .Assert (err , IsNil )
96
118
@@ -107,6 +129,9 @@ func (s *SymlinkSuite) TestOpenWithSymlinkToAbsolutePath(c *C) {
107
129
}
108
130
109
131
func (s * SymlinkSuite ) TestReadlink (c * C ) {
132
+ if runtime .GOOS == "plan9" {
133
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
134
+ }
110
135
err := util .WriteFile (s .FS , "file" , nil , 0644 )
111
136
c .Assert (err , IsNil )
112
137
@@ -115,6 +140,9 @@ func (s *SymlinkSuite) TestReadlink(c *C) {
115
140
}
116
141
117
142
func (s * SymlinkSuite ) TestReadlinkWithRelativePath (c * C ) {
143
+ if runtime .GOOS == "plan9" {
144
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
145
+ }
118
146
err := util .WriteFile (s .FS , "dir/file" , nil , 0644 )
119
147
c .Assert (err , IsNil )
120
148
@@ -127,6 +155,9 @@ func (s *SymlinkSuite) TestReadlinkWithRelativePath(c *C) {
127
155
}
128
156
129
157
func (s * SymlinkSuite ) TestReadlinkWithAbsolutePath (c * C ) {
158
+ if runtime .GOOS == "plan9" {
159
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
160
+ }
130
161
err := util .WriteFile (s .FS , "dir/file" , nil , 0644 )
131
162
c .Assert (err , IsNil )
132
163
@@ -139,6 +170,9 @@ func (s *SymlinkSuite) TestReadlinkWithAbsolutePath(c *C) {
139
170
}
140
171
141
172
func (s * SymlinkSuite ) TestReadlinkWithNonExistentTarget (c * C ) {
173
+ if runtime .GOOS == "plan9" {
174
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
175
+ }
142
176
err := s .FS .Symlink ("file" , "link" )
143
177
c .Assert (err , IsNil )
144
178
@@ -148,11 +182,17 @@ func (s *SymlinkSuite) TestReadlinkWithNonExistentTarget(c *C) {
148
182
}
149
183
150
184
func (s * SymlinkSuite ) TestReadlinkWithNonExistentLink (c * C ) {
185
+ if runtime .GOOS == "plan9" {
186
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
187
+ }
151
188
_ , err := s .FS .Readlink ("link" )
152
189
c .Assert (os .IsNotExist (err ), Equals , true )
153
190
}
154
191
155
192
func (s * SymlinkSuite ) TestStatLink (c * C ) {
193
+ if runtime .GOOS == "plan9" {
194
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
195
+ }
156
196
util .WriteFile (s .FS , "foo/bar" , []byte ("foo" ), customMode )
157
197
s .FS .Symlink ("bar" , "foo/qux" )
158
198
@@ -178,6 +218,9 @@ func (s *SymlinkSuite) TestLstat(c *C) {
178
218
}
179
219
180
220
func (s * SymlinkSuite ) TestLstatLink (c * C ) {
221
+ if runtime .GOOS == "plan9" {
222
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
223
+ }
181
224
util .WriteFile (s .FS , "foo/bar" , []byte ("fosddddaaao" ), customMode )
182
225
s .FS .Symlink ("bar" , "foo/qux" )
183
226
@@ -190,6 +233,9 @@ func (s *SymlinkSuite) TestLstatLink(c *C) {
190
233
}
191
234
192
235
func (s * SymlinkSuite ) TestRenameWithSymlink (c * C ) {
236
+ if runtime .GOOS == "plan9" {
237
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
238
+ }
193
239
err := s .FS .Symlink ("file" , "link" )
194
240
c .Assert (err , IsNil )
195
241
@@ -201,6 +247,9 @@ func (s *SymlinkSuite) TestRenameWithSymlink(c *C) {
201
247
}
202
248
203
249
func (s * SymlinkSuite ) TestRemoveWithSymlink (c * C ) {
250
+ if runtime .GOOS == "plan9" {
251
+ c .Skip ("skipping on Plan 9; symlinks are not supported" )
252
+ }
204
253
err := util .WriteFile (s .FS , "file" , []byte ("foo" ), 0644 )
205
254
c .Assert (err , IsNil )
206
255
0 commit comments