JS: rewrite source map generator to use specialized JSON writer
Fixes problems with string escaping. See KT-20005
This commit is contained in:
committed by
Alexey Andreev
parent
187ca71dc6
commit
361d6dfca0
@@ -0,0 +1,7 @@
|
||||
$TESTDATA_DIR$/sourceMapCharEscape.kt
|
||||
-no-stdlib
|
||||
-source-map
|
||||
-source-map-embed-sources
|
||||
always
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
@@ -0,0 +1 @@
|
||||
fun foo() = "©∑\n"
|
||||
@@ -0,0 +1 @@
|
||||
OK
|
||||
@@ -0,0 +1,2 @@
|
||||
// EXISTS: out.js
|
||||
// CONTAINS: out.js.map, \"©∑\\n\"\n
|
||||
@@ -545,6 +545,12 @@ public class CliTestGenerated extends AbstractCliTest {
|
||||
doJsTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("sourceMapCharEscape.args")
|
||||
public void testSourceMapCharEscape() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/sourceMapCharEscape.args");
|
||||
doJsTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("sourceMapDuplicateRelativePaths.args")
|
||||
public void testSourceMapDuplicateRelativePaths() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/sourceMapDuplicateRelativePaths.args");
|
||||
|
||||
Reference in New Issue
Block a user