mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
test: add known issue tests for recursive readdir calls with Buffer path
PR-URL: https://github.com/nodejs/node/pull/58893 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
35d1511aaa
commit
8d11399a98
3 changed files with 45 additions and 0 deletions
|
@ -0,0 +1,15 @@
|
|||
'use strict';
|
||||
|
||||
// This test will fail because the the implementation does not properly
|
||||
// handle the case when the path is a Buffer and the function is called
|
||||
// in recursive mode.
|
||||
|
||||
// Refs: https://github.com/nodejs/node/issues/58892
|
||||
|
||||
const common = require('../common');
|
||||
|
||||
const { readdir } = require('node:fs/promises');
|
||||
const { join } = require('node:path');
|
||||
|
||||
const testDirPath = join(__dirname, '..', '..');
|
||||
readdir(Buffer.from(testDirPath), { recursive: true }).then(common.mustCall());
|
15
test/known_issues/test-fs-readdir-recursive-with-buffer.js
Normal file
15
test/known_issues/test-fs-readdir-recursive-with-buffer.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
'use strict';
|
||||
|
||||
// This test will fail because the the implementation does not properly
|
||||
// handle the case when the path is a Buffer and the function is called
|
||||
// in recursive mode.
|
||||
|
||||
// Refs: https://github.com/nodejs/node/issues/58892
|
||||
|
||||
const common = require('../common');
|
||||
|
||||
const { readdir } = require('node:fs');
|
||||
const { join } = require('node:path');
|
||||
|
||||
const testDirPath = join(__dirname, '..', '..');
|
||||
readdir(Buffer.from(testDirPath), { recursive: true }, common.mustCall());
|
|
@ -0,0 +1,15 @@
|
|||
'use strict';
|
||||
|
||||
// This test will fail because the the implementation does not properly
|
||||
// handle the case when the path is a Buffer and the function is called
|
||||
// in recursive mode.
|
||||
|
||||
// Refs: https://github.com/nodejs/node/issues/58892
|
||||
|
||||
require('../common');
|
||||
|
||||
const { readdirSync } = require('node:fs');
|
||||
const { join } = require('node:path');
|
||||
|
||||
const testDirPath = join(__dirname, '..', '..');
|
||||
readdirSync(Buffer.from(testDirPath), { recursive: true });
|
Loading…
Add table
Add a link
Reference in a new issue