chore(main/nodejs): commit some test fixtures

This commit is contained in:
Yaksh Bariya 2024-02-20 21:33:13 +05:30
parent bb14ef479e
commit 88f3aad99b
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
3 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,18 @@
--- ./test/parallel/test-fs-readfile-pipe-large.js.orig 2024-02-20 18:49:29.737449292 +0530
+++ ./test/parallel/test-fs-readfile-pipe-large.js 2024-02-20 18:55:06.563112174 +0530
@@ -4,13 +4,13 @@
// Simulate `cat readfile.js | node readfile.js`
if (common.isWindows || common.isAIX || common.isIBMi)
- common.skip(`No /dev/stdin on ${process.platform}.`);
+ common.skip(`No /proc/self/fd/0 on ${process.platform}.`);
const assert = require('assert');
const fs = require('fs');
if (process.argv[2] === 'child') {
- fs.readFile('/dev/stdin', function(er, data) {
+ fs.readFile('/proc/self/fd/0', function(er, data) {
assert.ifError(er);
process.stdout.write(data);
});

View File

@ -0,0 +1,18 @@
--- ./test/parallel/test-fs-readfile-pipe.js.orig 2024-02-20 18:48:57.502931529 +0530
+++ ./test/parallel/test-fs-readfile-pipe.js 2024-02-20 18:52:36.717637243 +0530
@@ -25,13 +25,13 @@
// Simulate `cat readfile.js | node readfile.js`
if (common.isWindows || common.isAIX || common.isIBMi)
- common.skip(`No /dev/stdin on ${process.platform}.`);
+ common.skip(`No /proc/self/fd/0 on ${process.platform}.`);
const assert = require('assert');
const fs = require('fs');
if (process.argv[2] === 'child') {
- fs.readFile('/dev/stdin', common.mustSucceed((data) => {
+ fs.readFile('/proc/self/fd/0', common.mustSucceed((data) => {
process.stdout.write(data);
}));
return;

View File

@ -0,0 +1,18 @@
--- ./test/parallel/test-fs-readfilesync-pipe-large.js.orig 2024-02-20 18:49:12.450147520 +0530
+++ ./test/parallel/test-fs-readfilesync-pipe-large.js 2024-02-20 18:55:10.946605435 +0530
@@ -4,13 +4,13 @@
// Simulate `cat readfile.js | node readfile.js`
if (common.isWindows || common.isAIX || common.isIBMi)
- common.skip(`No /dev/stdin on ${process.platform}.`);
+ common.skip(`No /proc/self/fd/0 on ${process.platform}.`);
const assert = require('assert');
const fs = require('fs');
if (process.argv[2] === 'child') {
- process.stdout.write(fs.readFileSync('/dev/stdin', 'utf8'));
+ process.stdout.write(fs.readFileSync('/proc/self/fd/0', 'utf8'));
return;
}