var Uglify = require('../../'); var assert = require("assert"); describe("Input file as map", function() { it("Should accept object", function() { var jsMap = { '/scripts/foo.js': 'var foo = {"x": 1, y: 2, \'z\': 3};' }; var result = Uglify.minify(jsMap, {sourceMap: true}); var map = JSON.parse(result.map); assert.strictEqual(result.code, 'var foo={x:1,y:2,z:3};'); assert.deepEqual(map.sources, ['/scripts/foo.js']); assert.strictEqual(map.file, undefined); result = Uglify.minify(jsMap); assert.strictEqual(result.map, undefined); result = Uglify.minify(jsMap, {sourceMap: {filename: 'out.js'}}); map = JSON.parse(result.map); assert.strictEqual(map.file, 'out.js'); }); it("Should accept array of strings", function() { var jsSeq = [ 'var foo = {"x": 1, y: 2, \'z\': 3};', 'var bar = 15;' ]; var result = Uglify.minify(jsSeq, {sourceMap: true}); var map = JSON.parse(result.map); assert.strictEqual(result.code, 'var foo={x:1,y:2,z:3},bar=15;'); assert.deepEqual(map.sources, ['0', '1']); }); it("Should correctly include source", function() { var jsMap = { '/scripts/foo.js': 'var foo = {"x": 1, y: 2, \'z\': 3};' }; var result = Uglify.minify(jsMap, {sourceMap: {includeSources: true}}); var map = JSON.parse(result.map); assert.strictEqual(result.code, 'var foo={x:1,y:2,z:3};'); assert.deepEqual(map.sourcesContent, ['var foo = {"x": 1, y: 2, \'z\': 3};']); }); }); ' value='8b0e4177ee892c4c494338374c11d1b2475bd228'/>
path: root/gnu/packages/wv.scm
AgeCommit message (Expand)Author
2017-06-24gnu: Remove libwmf....This package contains many security vulnerabilities and is no longer maintained upstream. See this discussion for more information: https://lists.gnu.org/archive/html/guix-devel/2017-05/msg00478.html * gnu/packages/image.scm (libwmf): Remove variable. * gnu/packages/wv.scm (wv)[inputs]: Remove libwmf. [arguments]: Remove field. * gnu/packages/abiword.scm (abiword)[inputs]: Remove libwmf. [source]: Remove patch 'abiword-wmf-version-lookup-fix.patch'. * gnu/packages/patches/abiword-wmf-version-lookup-fix.patch, gnu/packages/patches/libwmf-CAN-2004-0941.patch, gnu/packages/patches/libwmf-CVE-2006-3376.patch, gnu/packages/patches/libwmf-CVE-2007-0455.patch, gnu/packages/patches/libwmf-CVE-2007-2756.patch, gnu/packages/patches/libwmf-CVE-2007-3472.patch, gnu/packages/patches/libwmf-CVE-2007-3473.patch, gnu/packages/patches/libwmf-CVE-2007-3477.patch, gnu/packages/patches/libwmf-CVE-2009-1364.patch, gnu/packages/patches/libwmf-CVE-2009-3546.patch, gnu/packages/patches/libwmf-CVE-2015-0848+CVE-2015-4588.patch, gnu/packages/patches/libwmf-CVE-2015-4695.patch, gnu/packages/patches/libwmf-CVE-2015-4696.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Remove them. Leo Famulari