GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: deflake child-process-pipe-dataflow · nodejs/node@01ffe03

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-child-process-pipe-dataflow.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-child-process-pipe-dataflow.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-pipe-dataflow.js
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ const common = require('../common');
33
const assert = require('assert');
44
const path = require('path');
55
const fs = require('fs');
6-
const os = require('os');
76
const spawn = require('child_process').spawn;
87
const tmpdir = require('../common/tmpdir');
98

@@ -22,12 +21,13 @@ const MB = KB * KB;
2221
const file = path.resolve(tmpdir.path, 'data.txt');
2322
const buf = Buffer.alloc(MB).fill('x');
2423

25-
// Most OS commands that deal with data, attach special
26-
// meanings to new line - for example, line buffering.
27-
// So cut the buffer into lines at some points, forcing
28-
// data flow to be split in the stream.
24+
// Most OS commands that deal with data, attach special meanings to new line -
25+
// for example, line buffering. So cut the buffer into lines at some points,
26+
// forcing data flow to be split in the stream. Do not use os.EOL for \n as
27+
// that is 2 characters on Windows and is sometimes converted to 1 character
28+
// which causes the test to fail.
2929
for (let i = 1; i < KB; i++)
30-
buf.write(os.EOL, i * KB);
30+
buf.write('\n', i * KB);
3131
fs.writeFileSync(file, buf.toString());
3232

3333
cat = spawn('cat', [file]);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.