diff --git a/lib/services/platform-service.ts b/lib/services/platform-service.ts index bde1e242ce..15483cbaf4 100644 --- a/lib/services/platform-service.ts +++ b/lib/services/platform-service.ts @@ -342,8 +342,8 @@ export class PlatformService implements IPlatformService { } private static parsePlatformSpecificFileName(fileName: string, platforms: string[]): any { - var regex = util.format("^(.+?)\.(%s)(\..+?)$", platforms.join("|")); - var parsed = fileName.toLowerCase().match(new RegExp(regex, "i")); + var regex = util.format("^(.+?)\\.(%s)(\\..+?)$", platforms.join("|")); + var parsed = fileName.match(new RegExp(regex, "i")); if (parsed) { return { platform: parsed[2], diff --git a/test/platform-service.ts b/test/platform-service.ts index ce2782d899..bf0ed7001a 100644 --- a/test/platform-service.ts +++ b/test/platform-service.ts @@ -235,7 +235,7 @@ describe('Platform Service Tests', () => { // Asserts that the files in app folder are process as platform specific assert.isTrue(fs.exists(path.join(appDestFolderPath, "app" , "test1.js")).wait()); - assert.isTrue(fs.exists(path.join(appDestFolderPath, "app", "test1-js")).wait()); + assert.isFalse(fs.exists(path.join(appDestFolderPath, "app", "test1-js")).wait()); assert.isFalse(fs.exists(path.join(appDestFolderPath, "app", "test2.js")).wait()); assert.isFalse(fs.exists(path.join(appDestFolderPath, "app", "test2-js")).wait()); @@ -286,7 +286,7 @@ describe('Platform Service Tests', () => { // Asserts that the files in app folder are process as platform specific assert.isTrue(fs.exists(path.join(appDestFolderPath, "app" , "test2.js")).wait()); - assert.isTrue(fs.exists(path.join(appDestFolderPath, "app", "test2-js")).wait()); + assert.isFalse(fs.exists(path.join(appDestFolderPath, "app", "test2-js")).wait()); assert.isFalse(fs.exists(path.join(appDestFolderPath, "app", "test1.js")).wait()); assert.isFalse(fs.exists(path.join(appDestFolderPath, "app", "test1-js")).wait());