File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -509,6 +509,32 @@ func TestIgnoreCreatedDir(t *testing.T) {
509
509
assert .Equal (t , expectedWatches , int (numberOfWatches .Value ()))
510
510
}
511
511
512
+ func TestIgnoreCreatedDirWithExclusions (t * testing.T ) {
513
+ f := newNotifyFixture (t )
514
+ defer f .tearDown ()
515
+
516
+ root := f .paths [0 ]
517
+ ignore , _ := dockerignore .NewDockerPatternMatcher (root ,
518
+ []string {
519
+ "a/b" ,
520
+ "c" ,
521
+ "!c/d" ,
522
+ })
523
+ f .setIgnore (ignore )
524
+
525
+ a := f .JoinPath (root , "a" )
526
+ b := f .JoinPath (a , "b" )
527
+ file := f .JoinPath (b , "bigFile" )
528
+ f .WriteFile (file , "hello" )
529
+ f .assertEvents (a )
530
+
531
+ expectedWatches := 2
532
+ if runtime .GOOS == "darwin" {
533
+ expectedWatches = 1
534
+ }
535
+ assert .Equal (t , expectedWatches , int (numberOfWatches .Value ()))
536
+ }
537
+
512
538
func TestIgnoreInitialDir (t * testing.T ) {
513
539
f := newNotifyFixture (t )
514
540
defer f .tearDown ()
You can’t perform that action at this time.
0 commit comments