Skip to content

Commit 5874272

Browse files
prakaashkpkaddaleax
authored andcommitted
test: set module loading error for aix
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>
1 parent d3b0722 commit 5874272

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/parallel/test-module-loading-error.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ const errorMessagesByPlatform = {
2828
win32: ['%1 is not a valid Win32 application'],
2929
linux: ['file too short', 'Exec format error'],
3030
sunos: ['unknown file type', 'not an ELF file'],
31-
darwin: ['file too short']
31+
darwin: ['file too short'],
32+
aix: ['Cannot load module',
33+
'Cannot run a file that does not have a valid format.']
3234
};
3335
// If we don't know a priori what the error would be, we accept anything.
3436
const errorMessages = errorMessagesByPlatform[process.platform] || [''];

0 commit comments

Comments
 (0)