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: add missing newlines to repl .exit writes · nodejs/node@3d708e0

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-repl-function-definition-edge-case.js
    • test-repl-import-referrer.js
    • test-repl-options.js
    • test-repl-require-context.js
    • test-repl-require-self-referential.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-repl-function-definition-edge-case.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-repl-function-definition-edge-case.js
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Reference: https://github.com/nodejs/node/pull/7624
22
'use strict';
3-
require('../common');
3+
const common = require('../common');
44
const assert = require('assert');
55
const repl = require('repl');
66
const stream = require('stream');
@@ -9,7 +9,8 @@ const r = initRepl();
99

1010
r.input.emit('data', 'function a() { return 42; } (1)\n');
1111
r.input.emit('data', 'a\n');
12-
r.input.emit('data', '.exit');
12+
r.input.emit('data', '.exit\n');
13+
r.once('exit', common.mustCall());
1314

1415
const expected = '1\n[Function: a]\n';
1516
const got = r.output.accumulator.join('');
Collapse file

‎test/parallel/test-repl-import-referrer.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-repl-import-referrer.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ child.on('exit', common.mustCall(() => {
2323
}));
2424

2525
child.stdin.write('await import(\'./message.mjs\');\n');
26-
child.stdin.write('.exit');
27-
child.stdin.end();
26+
child.stdin.write('.exit\n');
Collapse file

‎test/parallel/test-repl-options.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-repl-options.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,5 @@ r4.close();
136136
child.stdin.write(
137137
'assert.ok(util.inspect(repl.repl, {depth: -1}).includes("REPLServer"));\n'
138138
);
139-
child.stdin.write('.exit');
140-
child.stdin.end();
139+
child.stdin.write('.exit\n');
141140
}
Collapse file

‎test/parallel/test-repl-require-context.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-repl-require-context.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ child.on('exit', common.mustCall(() => {
2020
child.stdin.write('const isObject = (obj) => obj.constructor === Object;\n');
2121
child.stdin.write('isObject({});\n');
2222
child.stdin.write(`require(${JSON.stringify(fixture)}).isObject({});\n`);
23-
child.stdin.write('.exit');
24-
child.stdin.end();
23+
child.stdin.write('.exit\n');
Collapse file

‎test/parallel/test-repl-require-self-referential.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-repl-require-self-referential.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ child.on('exit', common.mustCall(() => {
2323
}));
2424

2525
child.stdin.write('require("self_ref");\n');
26-
child.stdin.write('.exit');
27-
child.stdin.end();
26+
child.stdin.write('.exit\n');

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.