GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: module loading error fix solaris #3798 · nodejs/node@9a628e2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-module-loading-error.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-module-loading-error.js
+6-10Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ var assert = require('assert');
55
console.error('load test-module-loading-error.js');
66

77
var error_desc = {
8-
win32: '%1 is not a valid Win32 application',
9-
linux: 'file too short',
10-
sunos: 'unknown file type'
8+
win32: ['%1 is not a valid Win32 application'],
9+
linux: ['file too short', 'Exec format error'],
10+
sunos: ['unknown file type', 'not an ELF file']
1111
};
12-
var musl_errno_enoexec = 'Exec format error';
13-
1412
var dlerror_msg = error_desc[process.platform];
1513

1614
if (!dlerror_msg) {
@@ -21,11 +19,9 @@ if (!dlerror_msg) {
2119
try {
2220
require('../fixtures/module-loading-error.node');
2321
} catch (e) {
24-
if (process.platform === 'linux' &&
25-
e.toString().indexOf(musl_errno_enoexec) !== -1) {
26-
dlerror_msg = musl_errno_enoexec;
27-
}
28-
assert.notEqual(e.toString().indexOf(dlerror_msg), -1);
22+
assert.strictEqual(dlerror_msg.some((errMsgCase) => {
23+
return e.toString().indexOf(errMsgCase) !== -1;
24+
}), true);
2925
}
3026

3127
try {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.