mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
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>
This commit is contained in:
1 parent
46f94f9111
commit
3fd7889e30
1 file changed
+3
@@ -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 },
|
||||
|
||||
Reference in new issue
Block a user