summaryrefslogtreecommitdiff
path: root/test/parallel/test-readline-keys.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2020-08-27 21:06:41 -0700
committerRich Trott <rtrott@gmail.com>2020-08-29 22:44:29 -0700
commit5c020762bb5b2b33a11b816c7fba12cce0df2e65 (patch)
tree3319e8bf8f00e38436df4548ac21e3ee7e4467ee /test/parallel/test-readline-keys.js
parent4fa439c5feafd31b26e083ce9f6642faf51c981e (diff)
downloadnode-new-5c020762bb5b2b33a11b816c7fba12cce0df2e65.tar.gz
test: add readline test for escape sequence
Tests do not cover a small piece of code in lib/internal/readline/utils.js for consuming an escape sequence. This adds a minimal test to cover the code. Refs: https://coverage.nodejs.org/coverage-0848f56cb3943209/lib/internal/readline/utils.js.html#L327 PR-URL: https://github.com/nodejs/node/pull/34952 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Diffstat (limited to 'test/parallel/test-readline-keys.js')
-rw-r--r--test/parallel/test-readline-keys.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/parallel/test-readline-keys.js b/test/parallel/test-readline-keys.js
index 0f5ca4d714..f0162ab06b 100644
--- a/test/parallel/test-readline-keys.js
+++ b/test/parallel/test-readline-keys.js
@@ -114,6 +114,9 @@ addTest('\x1b\x1b\x1b', [
{ name: 'escape', sequence: '\x1b\x1b\x1b', meta: true },
]);
+// Escape sequence
+addTest('\x1b]', [{ name: undefined, sequence: '\x1B]', meta: true }]);
+
// Control keys
addTest('\x01\x0b\x10', [
{ name: 'a', sequence: '\x01', ctrl: true },