From a17ebb25ee5472073ac903ffcf478562e8723c98 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Mon, 22 Jul 2024 16:16:35 +0200 Subject: [PATCH] test: ignore case when comparing paths on Windows Fixes: https://github.com/nodejs/node/issues/53989 --- test/parallel/test-child-process-cwd.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-child-process-cwd.js b/test/parallel/test-child-process-cwd.js index b527b7f9ea8012..7d8b7f2548246c 100644 --- a/test/parallel/test-child-process-cwd.js +++ b/test/parallel/test-child-process-cwd.js @@ -52,7 +52,14 @@ function testCwd(options, expectPidType, expectCode = 0, expectData) { }); child.on('close', common.mustCall(function() { - expectData && assert.strictEqual(data.trim(), expectData); + if (!expectData) return; + + if (common.isWindows) { + data = data.toLowerCase(); + expectData = expectData.toLowerCase(); + } + + assert.strictEqual(data.trim(), expectData); })); return child;