1
+ // +build !windows
2
+
1
3
package watch
2
4
3
5
import (
@@ -39,9 +41,6 @@ func TestNoWatches(t *testing.T) {
39
41
}
40
42
41
43
func TestEventOrdering (t * testing.T ) {
42
- if runtime .GOOS == "windows" {
43
- t .Skip ("Skipping on windows for now" )
44
- }
45
44
f := newNotifyFixture (t )
46
45
defer f .tearDown ()
47
46
@@ -74,9 +73,6 @@ func TestEventOrdering(t *testing.T) {
74
73
// of directories, creates files in them, then deletes
75
74
// them all quickly. Make sure there are no errors.
76
75
func TestGitBranchSwitch (t * testing.T ) {
77
- if runtime .GOOS == "windows" {
78
- t .Skip ("Skipping on windows for now" )
79
- }
80
76
f := newNotifyFixture (t )
81
77
defer f .tearDown ()
82
78
@@ -147,11 +143,10 @@ func TestWatchesAreRecursive(t *testing.T) {
147
143
f .events = nil
148
144
// change sub directory
149
145
changeFilePath := filepath .Join (subPath , "change" )
150
- h , err := os .OpenFile (changeFilePath , os .O_RDONLY | os .O_CREATE , 0666 )
146
+ _ , err := os .OpenFile (changeFilePath , os .O_RDONLY | os .O_CREATE , 0666 )
151
147
if err != nil {
152
148
t .Fatal (err )
153
149
}
154
- defer h .Close ()
155
150
156
151
f .assertEvents (changeFilePath )
157
152
}
@@ -173,12 +168,10 @@ func TestNewDirectoriesAreRecursivelyWatched(t *testing.T) {
173
168
174
169
// change something inside sub directory
175
170
changeFilePath := filepath .Join (subPath , "change" )
176
- h , err := os .OpenFile (changeFilePath , os .O_RDONLY | os .O_CREATE , 0666 )
171
+ _ , err := os .OpenFile (changeFilePath , os .O_RDONLY | os .O_CREATE , 0666 )
177
172
if err != nil {
178
173
t .Fatal (err )
179
174
}
180
- defer h .Close ()
181
-
182
175
f .assertEvents (subPath , changeFilePath )
183
176
}
184
177
@@ -285,9 +278,6 @@ func TestSingleFile(t *testing.T) {
285
278
}
286
279
287
280
func TestWriteBrokenLink (t * testing.T ) {
288
- if runtime .GOOS == "windows" {
289
- t .Skip ("Symlink creation requires admin privileges on Windows" )
290
- }
291
281
f := newNotifyFixture (t )
292
282
defer f .tearDown ()
293
283
@@ -302,9 +292,6 @@ func TestWriteBrokenLink(t *testing.T) {
302
292
}
303
293
304
294
func TestWriteGoodLink (t * testing.T ) {
305
- if runtime .GOOS == "windows" {
306
- t .Skip ("Symlink creation requires admin privileges on Windows" )
307
- }
308
295
f := newNotifyFixture (t )
309
296
defer f .tearDown ()
310
297
@@ -324,9 +311,6 @@ func TestWriteGoodLink(t *testing.T) {
324
311
}
325
312
326
313
func TestWatchBrokenLink (t * testing.T ) {
327
- if runtime .GOOS == "windows" {
328
- t .Skip ("Symlink creation requires admin privileges on Windows" )
329
- }
330
314
f := newNotifyFixture (t )
331
315
defer f .tearDown ()
332
316
@@ -355,10 +339,6 @@ func TestWatchBrokenLink(t *testing.T) {
355
339
}
356
340
357
341
func TestMoveAndReplace (t * testing.T ) {
358
- if runtime .GOOS == "windows" {
359
- t .Skip ("Skipping on windows for now" )
360
- }
361
-
362
342
f := newNotifyFixture (t )
363
343
defer f .tearDown ()
364
344
0 commit comments