--- /dev/null
+{
+ "version": 3,
+ "sources": ["index.js"],
+ "names": [],
+ "mappings": ";;AAAA,IAAI,MAAM,SAAN,GAAM;AAAA,SAAK,SAAS,CAAd;AAAA,CAAV;AACA,QAAQ,GAAR,CAAY,IAAI,KAAJ,CAAZ",
+ "file": "simple.js",
+ "sourcesContent": ["let foo = x => \"foo \" + x;\nconsole.log(foo(\"bar\"));"]
+}
'a["foo"]="bar",a.a="red",x={"bar":10};');
});
});
+
+ describe("inSourceMap", function() {
+ it("Should read the given string filename correctly when sourceMapIncludeSources is enabled (#1236)", function() {
+ var result = Uglify.minify('./test/mocha/input/issue-1236/simple.js', {
+ outSourceMap: "simple.js.min.map",
+ inSourceMap: "./test/mocha/input/issue-1236/simple.js.map",
+ sourceMapIncludeSources: true
+ });
+
+ var map = JSON.parse(result.map);
+
+ assert.equal(map.sourcesContent.length, 1);
+ assert.equal(map.sourcesContent[0],
+ 'let foo = x => "foo " + x;\nconsole.log(foo("bar"));');
+ });
+ });
});