src: disable fast math on arm
[platform/upstream/nodejs.git] / test / parallel / test-child-process-exec-error.js
1 var common = require('../common');
2 var assert = require('assert');
3 var child_process = require('child_process');
4
5 function test(fun, code) {
6   var errors = 0;
7
8   fun('does-not-exist', function(err) {
9     assert.equal(err.code, code);
10     assert(/does\-not\-exist/.test(err.cmd));
11     errors++;
12   });
13
14   process.on('exit', function() {
15     assert.equal(errors, 1);
16   });
17 }
18
19 if (process.platform === 'win32') {
20   test(child_process.exec, 1); // exit code of cmd.exe
21 } else {
22   test(child_process.exec, 127); // exit code of /bin/sh
23 }
24
25 test(child_process.execFile, 'ENOENT');