Skip to content

Commit

Permalink
test: compare paths on Windows without considering case
Browse files Browse the repository at this point in the history
PR-URL: #53993
Fixes: #53989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
EarlyRiser42 authored and marco-ippolito committed Aug 19, 2024
1 parent 490f15a commit f2b4fd3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/parallel/test-child-process-cwd.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
// In Windows, compare without considering case
if (common.isWindows) {
assert.strictEqual(data.trim().toLowerCase(), expectData.toLowerCase());
} else {
assert.strictEqual(data.trim(), expectData);
}
}
}));

return child;
Expand Down

0 comments on commit f2b4fd3

Please sign in to comment.