KT-3008 Fix UMD and plain module wrappers when module id is not a valid JS identifier

This commit is contained in:
Alexey Andreev
2016-04-20 13:46:39 +03:00
parent e38b83880f
commit b6b604d78f
6 changed files with 58 additions and 6 deletions
@@ -51,10 +51,26 @@ class MultiModuleWrappersTest() : MultipleModulesTranslationTest("multiModuleWra
runTest("simple")
}
@WithModuleKind(ModuleKind.UMD) fun testPlain() {
@WithModuleKind(ModuleKind.PLAIN) fun testPlain() {
runTest("simple")
}
@WithModuleKind(ModuleKind.AMD) fun testAmdModuleWithNonIdentifierName() {
runTest("moduleWithNonIdentifierName")
}
@WithModuleKind(ModuleKind.COMMON_JS) fun testCommonJsModuleWithNonIdentifierName() {
runTest("moduleWithNonIdentifierName")
}
@WithModuleKind(ModuleKind.UMD) fun testUmdModuleWithNonIdentifierName() {
runTest("moduleWithNonIdentifierName")
}
@WithModuleKind(ModuleKind.PLAIN) fun testPlainModuleWithNonIdentifierName() {
runTest("moduleWithNonIdentifierName")
}
fun runTest(name: String) {
overridenTestName = name
doTest("${pathToTestDir()}/cases/$name")