-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
According to wiki, all of [0x1b5c, 0x07, 0x9C] are valid ST (string terminator) signals, so support them all.
- Loading branch information
Showing
2 changed files
with
14 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,16 +43,19 @@ test('match only first', t => { | |
}); | ||
|
||
test('match terminal link', t => { | ||
t.regex('\u001B]8;k=v;https://example-a.com/?a_b=1&c=2#tit%20le\u0007click\u001B]8;;\u0007', ansiRegex()); | ||
t.regex('\u001B]8;;mailto:[email protected]\u0007mail\u001B]8;;\u0007', ansiRegex()); | ||
t.deepEqual('\u001B]8;k=v;https://example-a.com/?a_b=1&c=2#tit%20le\u0007click\u001B]8;;\u0007'.match(ansiRegex()), [ | ||
'\u001B]8;k=v;https://example-a.com/?a_b=1&c=2#tit%20le\u0007', | ||
'\u001B]8;;\u0007' | ||
]); | ||
t.deepEqual('\u001B]8;;mailto:[email protected]\u0007mail-me\u001B]8;;\u0007'.match(ansiRegex()), [ | ||
'\u001B]8;;mailto:[email protected]\u0007', | ||
'\u001B]8;;\u0007' | ||
]); | ||
const STs = ['\u0007', '\u001B\u005C', '\u009C'] | ||
Check failure on line 46 in test.js GitHub Actions / Node.js 14
|
||
STs.forEach(ST => { | ||
Check failure on line 47 in test.js GitHub Actions / Node.js 14
|
||
t.regex(`\u000B]8;k=v;https://example-a.com/?a_b=1&c=2#tit%20le${ST}click\u001B]8;;${ST}`, ansiRegex()); | ||
t.regex(`\u001B]8;;mailto:[email protected]${ST}mail\u001B]8;;${ST}`, ansiRegex()); | ||
t.deepEqual(`\u001B]8;k=v;https://example-a.com/?a_b=1&c=2#tit%20le${ST}click\u001B]8;;${ST}`.match(ansiRegex()), [ | ||
`\u001B]8;k=v;https://example-a.com/?a_b=1&c=2#tit%20le${ST}`, | ||
`\u001B]8;;${ST}` | ||
]); | ||
t.deepEqual(`\u001B]8;;mailto:[email protected]${ST}mail-me\u001B]8;;${ST}`.match(ansiRegex()), [ | ||
`\u001B]8;;mailto:[email protected]${ST}`, | ||
`\u001B]8;;${ST}` | ||
]); | ||
}) | ||
Check failure on line 58 in test.js GitHub Actions / Node.js 14
|
||
}); | ||
|
||
test('match "change icon name and window title" in string', t => { | ||
|