summaryrefslogtreecommitdiff
path: root/test/pseudo-tty
diff options
context:
space:
mode:
authorVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-04-28 04:06:42 +0300
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-05-05 17:39:05 +0300
commit8b76c3e60c7b5c274c757257580a2c0faae69097 (patch)
treea9f686995887dbeb0b5c5b23c5f3188987c99b2e /test/pseudo-tty
parent6bcf65d4a788a73b3c3f27d75796609f948f7885 (diff)
downloadandroid-node-v8-8b76c3e60c7b5c274c757257580a2c0faae69097.tar.gz
android-node-v8-8b76c3e60c7b5c274c757257580a2c0faae69097.tar.bz2
android-node-v8-8b76c3e60c7b5c274c757257580a2c0faae69097.zip
test: reduce string concatenations
PR-URL: https://github.com/nodejs/node/pull/12735 Refs: https://github.com/nodejs/node/pull/12455 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'test/pseudo-tty')
-rw-r--r--test/pseudo-tty/no_dropped_stdio.js4
-rw-r--r--test/pseudo-tty/no_interleaved_stdio.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/pseudo-tty/no_dropped_stdio.js b/test/pseudo-tty/no_dropped_stdio.js
index f7d9625c62..6aa721df35 100644
--- a/test/pseudo-tty/no_dropped_stdio.js
+++ b/test/pseudo-tty/no_dropped_stdio.js
@@ -6,10 +6,10 @@ const common = require('../common');
// 1000 bytes wrapped at 50 columns
// \n turns into a double-byte character
// (48 + {2}) * 20 = 1000
-let out = ('o'.repeat(48) + '\n').repeat(20);
+let out = `${'o'.repeat(48)}\n`.repeat(20);
// Add the remaining 24 bytes and terminate with an 'O'.
// This results in 1025 bytes, just enough to overflow the 1kb OS X TTY buffer.
-out += 'o'.repeat(24) + 'O';
+out += `${'o'.repeat(24)}O`;
// In AIX, the child exits even before the python parent
// can setup the readloop. Provide a reasonable delay.
diff --git a/test/pseudo-tty/no_interleaved_stdio.js b/test/pseudo-tty/no_interleaved_stdio.js
index ba3989f938..3f1e7b5fb1 100644
--- a/test/pseudo-tty/no_interleaved_stdio.js
+++ b/test/pseudo-tty/no_interleaved_stdio.js
@@ -6,10 +6,10 @@ const common = require('../common');
// 1000 bytes wrapped at 50 columns
// \n turns into a double-byte character
// (48 + {2}) * 20 = 1000
-let out = ('o'.repeat(48) + '\n').repeat(20);
+let out = `${'o'.repeat(48)}\n`.repeat(20);
// Add the remaining 24 bytes and terminate with an 'O'.
// This results in 1025 bytes, just enough to overflow the 1kb OS X TTY buffer.
-out += 'o'.repeat(24) + 'O';
+out += `${'o'.repeat(24)}O`;
const err = '__This is some stderr__';