diff options
author | JungMinu <jmwsoft@gmail.com> | 2016-08-09 00:55:19 +0900 |
---|---|---|
committer | JungMinu <jmwsoft@gmail.com> | 2016-08-13 23:03:30 +0900 |
commit | fce4b981eacbce0b85a2418d042f1f67d40e9834 (patch) | |
tree | bc8a170ad3193ab02c1210e94218e6230fec302b /test/parallel/test-repl-require.js | |
parent | 6a3dbdacd6cf67f643dee219fd782a193ddd2534 (diff) | |
download | android-node-v8-fce4b981eacbce0b85a2418d042f1f67d40e9834.tar.gz android-node-v8-fce4b981eacbce0b85a2418d042f1f67d40e9834.tar.bz2 android-node-v8-fce4b981eacbce0b85a2418d042f1f67d40e9834.zip |
repl,util: insert carriage returns in output
`\n` is not enough for Linux with some custom stream
add carriage returns to ensure that the output is displayed correctly
using `\r\n` should not be a problem, even on non-Windows platforms.
Fixes: https://github.com/nodejs/node/issues/7954
PR-URL: https://github.com/nodejs/node/pull/8028
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test/parallel/test-repl-require.js')
-rw-r--r-- | test/parallel/test-repl-require.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-repl-require.js b/test/parallel/test-repl-require.js index 9dc3b51de7..2c8ac4ecd2 100644 --- a/test/parallel/test-repl-require.js +++ b/test/parallel/test-repl-require.js @@ -24,11 +24,11 @@ server.listen(options, function() { const conn = net.connect(options); conn.setEncoding('utf8'); conn.on('data', (data) => answer += data); - conn.write('require("baz")\nrequire("./baz")\n.exit\n'); + conn.write('require("baz")\r\nrequire("./baz")\r\n.exit\r\n'); }); process.on('exit', function() { assert.strictEqual(false, /Cannot find module/.test(answer)); assert.strictEqual(false, /Error/.test(answer)); - assert.strictEqual(answer, '\'eye catcher\'\n\'perhaps I work\'\n'); + assert.strictEqual(answer, '\'eye catcher\'\r\n\'perhaps I work\'\r\n'); }); |