@@ -50,6 +50,50 @@ describe('gulp input stream', function() {
50
50
} ) ;
51
51
} ) ;
52
52
53
+ it ( 'should return a input stream for multiple globs, with negation' , function ( done ) {
54
+ var expectedPath = join ( __dirname , "./fixtures/stuff/run.dmc" ) ;
55
+ var globArray = [
56
+ join ( __dirname , "./fixtures/stuff/*.dmc" ) ,
57
+ '!' + join ( __dirname , "./fixtures/stuff/test.dmc" ) ,
58
+ ] ;
59
+ var stream = gulp . src ( globArray ) ;
60
+
61
+ var files = [ ] ;
62
+ stream . on ( 'error' , done ) ;
63
+ stream . on ( 'data' , function ( file ) {
64
+ should . exist ( file ) ;
65
+ should . exist ( file . path ) ;
66
+ files . push ( file ) ;
67
+ } ) ;
68
+ stream . on ( 'end' , function ( ) {
69
+ files . length . should . equal ( 1 ) ;
70
+ files [ 0 ] . path . should . equal ( expectedPath ) ;
71
+ done ( ) ;
72
+ } ) ;
73
+ } ) ;
74
+
75
+ it ( 'should return a input stream for multiple globs, with negation' , function ( done ) {
76
+ var expectedPath = join ( __dirname , "./fixtures/stuff/run.dmc" ) ;
77
+ var globArray = [
78
+ join ( __dirname , "./fixtures/stuff/run.dmc" ) ,
79
+ '!' + join ( __dirname , "./fixtures/stuff/test.dmc" ) ,
80
+ ] ;
81
+ var stream = gulp . src ( globArray ) ;
82
+
83
+ var files = [ ] ;
84
+ stream . on ( 'error' , done ) ;
85
+ stream . on ( 'data' , function ( file ) {
86
+ should . exist ( file ) ;
87
+ should . exist ( file . path ) ;
88
+ files . push ( file ) ;
89
+ } ) ;
90
+ stream . on ( 'end' , function ( ) {
91
+ files . length . should . equal ( 1 ) ;
92
+ files [ 0 ] . path . should . equal ( expectedPath ) ;
93
+ done ( ) ;
94
+ } ) ;
95
+ } ) ;
96
+
53
97
it ( 'should return a input stream with no contents when read is false' , function ( done ) {
54
98
var stream = gulp . src ( join ( __dirname , "./fixtures/*.coffee" ) , { read : false } ) ;
55
99
stream . on ( 'error' , done ) ;
0 commit comments