Skip to content

Commit

Permalink
test: set module loading error for aix
Browse files Browse the repository at this point in the history
In test/parallel/test-module-loading-error.js, an attempt is made to
load a text file as a native executable. This results in an error
message in a platform specific manner.

AIX was not included in the list of platforms. This fix introduces
the AIX error messages.

PR-URL: #14511
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
  • Loading branch information
prakaashkpk authored and addaleax committed Aug 10, 2017
1 parent d3b0722 commit 5874272
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/parallel/test-module-loading-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ const errorMessagesByPlatform = {
win32: ['%1 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']
darwin: ['file too short'],
aix: ['Cannot load module',
'Cannot run a file that does not have a valid format.']
};
// If we don't know a priori what the error would be, we accept anything.
const errorMessages = errorMessagesByPlatform[process.platform] || [''];
Expand Down

0 comments on commit 5874272

Please sign in to comment.