@@ -31,19 +31,19 @@ func TestCreateFile(t *testing.T) {
31
31
s , err := fswatch .NewSession (
32
32
[]string {tmp },
33
33
func (e []fswatch.Event ) {
34
- assert .Len (t , e , 1 )
34
+ assert .NotEmpty (t , e )
35
35
assert .LessOrEqual (t , e [0 ].Time , time .Now ())
36
36
37
37
path , _ := filepath .EvalSymlinks (e [0 ].Path )
38
38
39
39
switch i {
40
40
case 0 :
41
41
assert .Equal (t , tmp , path )
42
- assert .Equal (t , []fswatch. EventType { fswatch . Created , fswatch .IsDir }, e [ 0 ]. Types )
42
+ assert .Contains (t , e [ 0 ]. Types , fswatch .IsDir )
43
43
44
44
case 1 :
45
45
assert .Equal (t , foo , path )
46
- assert .Equal (t , []fswatch. EventType { fswatch . Created , fswatch .IsFile }, e [ 0 ]. Types )
46
+ assert .Contains (t , e [ 0 ]. Types , fswatch .Created )
47
47
}
48
48
49
49
i ++
@@ -55,7 +55,7 @@ func TestCreateFile(t *testing.T) {
55
55
fswatch .WithRecursive (true ),
56
56
fswatch .WithDirectoryOnly (true ),
57
57
fswatch .WithFollowSymlinks (true ),
58
- fswatch .WithEventTypeFilters ([]fswatch.EventType {fswatch .Created , fswatch .IsDir , fswatch .IsFile }),
58
+ fswatch .WithEventTypeFilters ([]fswatch.EventType {fswatch .Created , fswatch .Updated , fswatch . IsDir , fswatch .IsFile }),
59
59
fswatch .WithFilters ([]fswatch.Filter {{Text : "bar$" , FilterType : fswatch .FilterExclude , CaseSensitive : false , Extended : false }}),
60
60
fswatch .WithProperties (map [string ]string {"foo" : "bar" }),
61
61
)
0 commit comments