Skip to content

Commit 510c38c

Browse files
committed
fixup! skip tests that are hopeless
1 parent 70295a8 commit 510c38c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

test/fixtures/snapshot/child-process-sync.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ const {
88
function spawn() {
99
const { spawnSync, execFileSync, execSync } = require('child_process');
1010
spawnSync(process.execPath, [ __filename, 'spawnSync' ], { stdio: 'inherit' });
11-
execSync(`"${process.execPath}" "${__filename}" "execSync"`, { stdio: 'inherit' });
11+
if (!process.env.DIRNAME_CONTAINS_SHELL_UNSAFE_CHARS)
12+
execSync(`"${process.execPath}" "${__filename}" "execSync"`, { stdio: 'inherit' });
1213
execFileSync(process.execPath, [ __filename, 'execFileSync' ], { stdio: 'inherit' });
1314
}
1415

test/parallel/test-snapshot-child-process-sync.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// restoring state from a snapshot
55

66
require('../common');
7-
const { spawnSyncAndAssert } = require('../common/child_process');
7+
const { isInsideCWDWithUnusualChars, spawnSyncAndAssert } = require('../common/child_process');
88
const tmpdir = require('../common/tmpdir');
99
const fixtures = require('../common/fixtures');
1010
const assert = require('assert');
@@ -27,6 +27,7 @@ const expected = [
2727
file,
2828
], {
2929
cwd: tmpdir.path,
30+
env: { ...process.env, DIRNAME_CONTAINS_SHELL_UNSAFE_CHARS: isInsideCWDWithUnusualChars ? 'TRUE' : '' },
3031
}, {
3132
trim: true,
3233
stdout(output) {
@@ -43,6 +44,7 @@ const expected = [
4344
file,
4445
], {
4546
cwd: tmpdir.path,
47+
env: { ...process.env, DIRNAME_CONTAINS_SHELL_UNSAFE_CHARS: isInsideCWDWithUnusualChars ? 'TRUE' : '' },
4648
}, {
4749
trim: true,
4850
stdout(output) {

0 commit comments

Comments
 (0)