diff options
author | Rich Trott <rtrott@gmail.com> | 2020-08-27 21:06:41 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2020-08-29 22:44:29 -0700 |
commit | 5c020762bb5b2b33a11b816c7fba12cce0df2e65 (patch) | |
tree | 3319e8bf8f00e38436df4548ac21e3ee7e4467ee /test/parallel/test-readline-keys.js | |
parent | 4fa439c5feafd31b26e083ce9f6642faf51c981e (diff) | |
download | node-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.js | 3 |
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 }, |