Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Test surrogate pair filenames on windows #51800

Closed
wants to merge 13 commits into from
Prev Previous commit
Next Next commit
Update fs-operations-with-surrogate-pairs.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
mertcanaltin and aduh95 authored Feb 19, 2024
commit 1f2671ab6a6b24c0133a820eaf8507ddcecf9b3a
21 changes: 0 additions & 21 deletions test/parallel/fs-operations-with-surrogate-pairs.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,5 @@ describe('File operations with filenames containing surrogate pairs', () => {
// Check if the content matches
assert.strictEqual(readContent, content);

// Get directory contents
const dirs = fs.readdirSync(tempdir);
assert.strictEqual(dirs.length > 0, true);

// Check if the file is in the directory contents
let match = false;
for (let i = 0; i < dirs.length; i++) {
if (dirs[i].endsWith(filename)) {
match = true;
break;
}
}
assert.strictEqual(match, true);

// Delete the file
fs.unlinkSync(path.join(tempdir, filename));
assert.strictEqual(fs.existsSync(path.join(tempdir, filename)), false);

// Remove the temporary directory
fs.rmdirSync(tempdir);
assert.strictEqual(fs.existsSync(tempdir), false);
});
});
Loading