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
Expand file treeCollapse file tree
Open diff view settings
Collapse file
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 number | Diff line number | Diff line change |
|---|
|
1 | 1 | // Reference: https://github.com/nodejs/node/pull/7624 |
2 | 2 | 'use strict'; |
3 | | -require('../common'); |
| 3 | +const common = require('../common'); |
4 | 4 | const assert = require('assert'); |
5 | 5 | const repl = require('repl'); |
6 | 6 | const stream = require('stream'); |
@@ -9,7 +9,8 @@ const r = initRepl(); |
9 | 9 |
|
10 | 10 | r.input.emit('data', 'function a() { return 42; } (1)\n'); |
11 | 11 | 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()); |
13 | 14 |
|
14 | 15 | const expected = '1\n[Function: a]\n'; |
15 | 16 | const got = r.output.accumulator.join(''); |
|
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-repl-import-referrer.js +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -23,5 +23,4 @@ child.on('exit', common.mustCall(() => { |
23 | 23 | })); |
24 | 24 |
|
25 | 25 | 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
Copy file name to clipboardExpand all lines: test/parallel/test-repl-options.js +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -136,6 +136,5 @@ r4.close(); |
136 | 136 | child.stdin.write( |
137 | 137 | 'assert.ok(util.inspect(repl.repl, {depth: -1}).includes("REPLServer"));\n' |
138 | 138 | ); |
139 | | - child.stdin.write('.exit'); |
140 | | - child.stdin.end(); |
| 139 | + child.stdin.write('.exit\n'); |
141 | 140 | } |
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-repl-require-context.js +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -20,5 +20,4 @@ child.on('exit', common.mustCall(() => { |
20 | 20 | child.stdin.write('const isObject = (obj) => obj.constructor === Object;\n'); |
21 | 21 | child.stdin.write('isObject({});\n'); |
22 | 22 | 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
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 number | Diff line number | Diff line change |
|---|
@@ -23,5 +23,4 @@ child.on('exit', common.mustCall(() => { |
23 | 23 | })); |
24 | 24 |
|
25 | 25 | child.stdin.write('require("self_ref");\n'); |
26 | | -child.stdin.write('.exit'); |
27 | | -child.stdin.end(); |
| 26 | +child.stdin.write('.exit\n'); |