Skip to content

Commit 9057a16

Browse files
Trottrichardlau
authored andcommitted
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: #34952 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
1 parent 75d1612 commit 9057a16

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/parallel/test-readline-keys.js

+3
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ addTest('\x1b\x1b\x1b', [
114114
{ name: 'escape', sequence: '\x1b\x1b\x1b', meta: true },
115115
]);
116116

117+
// Escape sequence
118+
addTest('\x1b]', [{ name: undefined, sequence: '\x1B]', meta: true }]);
119+
117120
// Control keys
118121
addTest('\x01\x0b\x10', [
119122
{ name: 'a', sequence: '\x01', ctrl: true },

0 commit comments

Comments
 (0)