From cf40d7dd10d56ef248725e0820fbb532163f39a1 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sat, 29 Jul 2023 11:07:24 +0200 Subject: [PATCH] disable test expected to fail --- test/parallel/test-fs-cp.mjs | 2 +- .../test-startup-empty-regexp-statics.js | 5 +++ .../test-startup-empty-regexp-statics.mjs | 44 ++++++++++--------- 3 files changed, 29 insertions(+), 22 deletions(-) diff --git a/test/parallel/test-fs-cp.mjs b/test/parallel/test-fs-cp.mjs index fae3b7afbdd7a2..3c212910e7eac1 100644 --- a/test/parallel/test-fs-cp.mjs +++ b/test/parallel/test-fs-cp.mjs @@ -654,7 +654,7 @@ if (!isWindows && !isInsideCWDWithUnusualChars) { } // It returns an error if attempt is made to copy socket. -if (!isWindows) { +if (!isWindows && !isInsideCWDWithUnusualChars) { const src = nextdir(); mkdirSync(src); const dest = nextdir(); diff --git a/test/parallel/test-startup-empty-regexp-statics.js b/test/parallel/test-startup-empty-regexp-statics.js index 65081cc81bbe3d..d46d94536d8472 100644 --- a/test/parallel/test-startup-empty-regexp-statics.js +++ b/test/parallel/test-startup-empty-regexp-statics.js @@ -1,6 +1,11 @@ 'use strict'; const common = require('../common'); + +if (common.isInsideCWDWithUnusualChars) { + common.skip('expected failure'); +} + const assert = require('node:assert'); const { spawnSync, spawn } = require('node:child_process'); diff --git a/test/parallel/test-startup-empty-regexp-statics.mjs b/test/parallel/test-startup-empty-regexp-statics.mjs index 1f3869372b9690..85cbaf0d2a21f2 100644 --- a/test/parallel/test-startup-empty-regexp-statics.mjs +++ b/test/parallel/test-startup-empty-regexp-statics.mjs @@ -1,26 +1,28 @@ // We must load the CJS version here because the ESM wrapper call `hasIPv6` // which compiles a RegEx. // eslint-disable-next-line node-core/require-common-first -import '../common/index.js'; +import common from '../common/index.js'; import assert from 'node:assert'; -assert.strictEqual(RegExp.$_, ''); -assert.strictEqual(RegExp.$0, undefined); -assert.strictEqual(RegExp.$1, ''); -assert.strictEqual(RegExp.$2, ''); -assert.strictEqual(RegExp.$3, ''); -assert.strictEqual(RegExp.$4, ''); -assert.strictEqual(RegExp.$5, ''); -assert.strictEqual(RegExp.$6, ''); -assert.strictEqual(RegExp.$7, ''); -assert.strictEqual(RegExp.$8, ''); -assert.strictEqual(RegExp.$9, ''); -assert.strictEqual(RegExp.input, ''); -assert.strictEqual(RegExp.lastMatch, ''); -assert.strictEqual(RegExp.lastParen, ''); -assert.strictEqual(RegExp.leftContext, ''); -assert.strictEqual(RegExp.rightContext, ''); -assert.strictEqual(RegExp['$&'], ''); -assert.strictEqual(RegExp['$`'], ''); -assert.strictEqual(RegExp['$+'], ''); -assert.strictEqual(RegExp["$'"], ''); +if (!common.isInsideCWDWithUnusualChars) { + assert.strictEqual(RegExp.$_, ''); + assert.strictEqual(RegExp.$0, undefined); + assert.strictEqual(RegExp.$1, ''); + assert.strictEqual(RegExp.$2, ''); + assert.strictEqual(RegExp.$3, ''); + assert.strictEqual(RegExp.$4, ''); + assert.strictEqual(RegExp.$5, ''); + assert.strictEqual(RegExp.$6, ''); + assert.strictEqual(RegExp.$7, ''); + assert.strictEqual(RegExp.$8, ''); + assert.strictEqual(RegExp.$9, ''); + assert.strictEqual(RegExp.input, ''); + assert.strictEqual(RegExp.lastMatch, ''); + assert.strictEqual(RegExp.lastParen, ''); + assert.strictEqual(RegExp.leftContext, ''); + assert.strictEqual(RegExp.rightContext, ''); + assert.strictEqual(RegExp['$&'], ''); + assert.strictEqual(RegExp['$`'], ''); + assert.strictEqual(RegExp['$+'], ''); + assert.strictEqual(RegExp["$'"], ''); +}