summaryrefslogtreecommitdiff
path: root/test/parallel/test-repl-persistent-history.js
diff options
context:
space:
mode:
authorJungMinu <jmwsoft@gmail.com>2016-08-09 00:55:19 +0900
committerJungMinu <jmwsoft@gmail.com>2016-08-13 23:03:30 +0900
commitfce4b981eacbce0b85a2418d042f1f67d40e9834 (patch)
treebc8a170ad3193ab02c1210e94218e6230fec302b /test/parallel/test-repl-persistent-history.js
parent6a3dbdacd6cf67f643dee219fd782a193ddd2534 (diff)
downloadandroid-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-persistent-history.js')
-rw-r--r--test/parallel/test-repl-persistent-history.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-repl-persistent-history.js b/test/parallel/test-repl-persistent-history.js
index 0a38cfc480..40951fd5ed 100644
--- a/test/parallel/test-repl-persistent-history.js
+++ b/test/parallel/test-repl-persistent-history.js
@@ -37,7 +37,7 @@ class ActionStream extends stream.Stream {
if (typeof action === 'object') {
self.emit('keypress', '', action);
} else {
- self.emit('data', action + '\n');
+ self.emit('data', action + '\r\n');
}
setImmediate(doAction);
}
@@ -138,7 +138,7 @@ const tests = [
env: { NODE_REPL_HISTORY_FILE: oldHistoryPath },
test: [UP, CLEAR, '\'42\'', ENTER],
expected: [prompt, convertMsg, prompt, prompt + '\'=^.^=\'', prompt, '\'',
- '4', '2', '\'', '\'42\'\n', prompt, prompt],
+ '4', '2', '\'', '\'42\'\r\n', prompt, prompt],
after: function ensureHistoryFixture() {
// XXX(Fishrock123) Make sure nothing weird happened to our fixture
// or it's temporary copy.
@@ -154,7 +154,7 @@ const tests = [
{ // Requires the above testcase
env: {},
test: [UP, UP, ENTER],
- expected: [prompt, prompt + '\'42\'', prompt + '\'=^.^=\'', '\'=^.^=\'\n',
+ expected: [prompt, prompt + '\'42\'', prompt + '\'=^.^=\'', '\'=^.^=\'\r\n',
prompt]
},
{