mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
test: compare paths on Windows without considering case
PR-URL: https://github.com/nodejs/node/pull/53993 Fixes: https://github.com/nodejs/node/issues/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>
This commit is contained in:
parent
42fd6401c2
commit
1eac9a3d41
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user