| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 08d6830 commit 4030c7e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,17 +2,15 @@ | |||
| 2 | 2 | const common = require('../common'); | |
| 3 | 3 | const assert = require('assert'); | |
| 4 | 4 | ||
| 5 | - console.error('load test-module-loading-error.js'); | ||
| 6 | - | ||
| 7 | - const error_desc = { | ||
| 8 | - win32: ['%1 is not a valid Win32 application'], | ||
| 5 | + const errorMessagesByPlatform = { | ||
| 6 | + win32: ['is not a valid Win32 application'], | ||
| 9 | 7 | linux: ['file too short', 'Exec format error'], | |
| 10 | 8 | sunos: ['unknown file type', 'not an ELF file'], | |
| 11 | 9 | darwin: ['file too short'], | |
| 12 | 10 | aix: ['Cannot load module', | |
| 13 | 11 | 'Cannot run a file that does not have a valid format.'] | |
| 14 | 12 | }; | |
| 15 | - const dlerror_msg = error_desc[process.platform]; | ||
| 13 | + const dlerror_msg = errorMessagesByPlatform[process.platform]; | ||
| 16 | 14 | ||
| 17 | 15 | if (!dlerror_msg) | |
| 18 | 16 | common.skip('platform not supported.'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments