Skip to content

Commit

Permalink
test: update windows module load error message
Browse files Browse the repository at this point in the history
libuv 1.14.0 includes a fix for the "%1 is not a valid Win32
application" error message.

Refs: #14866
PR-URL: #14950
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
cjihrig authored and MylesBorins committed Oct 25, 2017
1 parent 08d6830 commit 4030c7e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/parallel/test-module-loading-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
const common = require('../common');
const assert = require('assert');

console.error('load test-module-loading-error.js');

const error_desc = {
win32: ['%1 is not a valid Win32 application'],
const errorMessagesByPlatform = {
win32: ['is not a valid Win32 application'],
linux: ['file too short', 'Exec format error'],
sunos: ['unknown file type', 'not an ELF file'],
darwin: ['file too short'],
aix: ['Cannot load module',
'Cannot run a file that does not have a valid format.']
};
const dlerror_msg = error_desc[process.platform];
const dlerror_msg = errorMessagesByPlatform[process.platform];

if (!dlerror_msg)
common.skip('platform not supported.');
Expand Down

0 comments on commit 4030c7e

Please sign in to comment.