Skip to content

Commit f581b02

Browse files
author
Contra
committed
Merge branch 'master' of https://github.com/wearefractal/gulp
2 parents 060416f + d96b21c commit f581b02

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

test/src.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,50 @@ describe('gulp input stream', function() {
5050
});
5151
});
5252

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+
5397
it('should return a input stream with no contents when read is false', function(done) {
5498
var stream = gulp.src(join(__dirname, "./fixtures/*.coffee"), {read: false});
5599
stream.on('error', done);

0 commit comments

Comments
 (0)