Skip to content

Commit 8059be6

Browse files
authored
Merge pull request webpack#3481 from webpack/test/case-sensitive
add test case for case sensitive module warning
2 parents ea46fda + 0d2b639 commit 8059be6

File tree

6 files changed

+19
-1
lines changed

6 files changed

+19
-1
lines changed

test/TestCases.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ describe("TestCases", function() {
104104
var filterPath = path.join(testDirectory, "test.filter.js");
105105
if(fs.existsSync(filterPath) && !require(filterPath)(config)) {
106106
describe.skip(test, function() {
107-
it('filtered')
107+
it('filtered');
108108
});
109109
return false;
110110
}

test/cases/errors/case-sensistive/a.js

Whitespace-only changes.

test/cases/errors/case-sensistive/b/file.js

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
it("should return different modules with different casing", function() {
2+
var a = require("./a");
3+
var A = require("./A");
4+
var b = require("./b/file.js");
5+
var B = require("./B/file.js");
6+
a.should.not.be.equal(A);
7+
b.should.not.be.equal(B);
8+
});
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
var fs = require("fs");
2+
var path = require("path");
3+
4+
module.exports = function(config) {
5+
return fs.existsSync(path.join(__dirname, "TEST.FILTER.JS"));
6+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = [
2+
[/There are multiple modules with names that only differ in casing/, /case-sensistive.A\.js/, /case-sensistive.a\.js/],
3+
[/There are multiple modules with names that only differ in casing/, /case-sensistive.B.file\.js/, /case-sensistive.b.file\.js/]
4+
];

0 commit comments

Comments
 (0)