| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ const common = require('../common'); | |||
| 4 | 4 | const { isMainThread } = require('worker_threads'); | |
| 5 | 5 | ||
| 6 | 6 | // FIXME add sunos support | |
| 7 | - if (common.isSunOS || common.isIBMi) { | ||
| 7 | + if (common.isSunOS || common.isIBMi || common.isWindows) { | ||
| 8 | 8 | common.skip(`Unsupported platform [${process.platform}]`); | |
| 9 | 9 | } | |
| 10 | 10 | ||
@@ -25,15 +25,10 @@ assert.notStrictEqual(process.title, title); | |||
| 25 | 25 | process.title = title; | |
| 26 | 26 | assert.strictEqual(process.title, title); | |
| 27 | 27 | ||
| 28 | - // Test setting the title but do not try to run `ps` on Windows. | ||
| 29 | - if (common.isWindows) { | ||
| 30 | - common.skip('Windows does not have "ps" utility'); | ||
| 31 | - } | ||
| 32 | - | ||
| 33 | 28 | try { | |
| 34 | 29 | execSync('command -v ps'); | |
| 35 | 30 | } catch (err) { | |
| 36 | - if (err.status === 1) { | ||
| 31 | + if (err.status === 1 || err.status === 127) { | ||
| 37 | 32 | common.skip('The "ps" utility is not available'); | |
| 38 | 33 | } | |
| 39 | 34 | throw err; | |
@@ -53,5 +48,5 @@ exec(cmd, common.mustSucceed((stdout, stderr) => { | |||
| 53 | 48 | title += ` (${path.basename(process.execPath)})`; | |
| 54 | 49 | ||
| 55 | 50 | // Omitting trailing whitespace and \n | |
| 56 | - assert.strictEqual(stdout.replace(/\s+$/, '').endsWith(title), true); | ||
| 51 | + assert.ok(stdout.trimEnd().endsWith(title)); | ||
| 57 | 52 | })); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments