|
@@ -555,6 +555,30 @@ describe('asar package', function () {
|
|
|
})
|
|
|
})
|
|
|
|
|
|
+ describe('child_process.exec', function () {
|
|
|
+ var child_process = require('child_process');
|
|
|
+ var echo = path.join(fixtures, 'asar', 'echo.asar', 'echo')
|
|
|
+
|
|
|
+ it('should not try to extract the command if there is a reference to a file inside an .asar', function (done) {
|
|
|
+ child_process.exec('echo ' + echo + ' foo bar', function (error, stdout) {
|
|
|
+ assert.equal(error, null)
|
|
|
+ assert.equal(stdout.toString().replace(/\r/g, ''), echo + ' foo bar\n')
|
|
|
+ done()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ describe('child_process.execSync', function () {
|
|
|
+ var child_process = require('child_process');
|
|
|
+ var echo = path.join(fixtures, 'asar', 'echo.asar', 'echo')
|
|
|
+
|
|
|
+ it('should not try to extract the command if there is a reference to a file inside an .asar', function (done) {
|
|
|
+ var stdout = child_process.execSync('echo ' + echo + ' foo bar')
|
|
|
+ assert.equal(stdout.toString().replace(/\r/g, ''), echo + ' foo bar\n')
|
|
|
+ done()
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
describe('child_process.execFile', function () {
|
|
|
var echo, execFile, execFileSync, ref2
|
|
|
if (process.platform !== 'darwin') {
|