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 RafaelGSS committed Aug 5, 2024
1 parent e0054ee commit 52bc8ec
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 52bc8ec

Please sign in to comment.