Skip to content

Commit 3fd7889

Browse files
Trottaddaleax
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 46f94f9 commit 3fd7889

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎test/parallel/test-readline-keys.js‎

Lines changed: 3 additions & 0 deletions
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)