Skip to content

Commit bfbbb12

Browse files
committed
Add test for @@ links
1 parent 1df7ec7 commit bfbbb12

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/vs/workbench/contrib/terminalContrib/links/test/browser/terminalMultiLineLinkDetector.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,18 @@ interface LinkFormatInfo {
8484
}
8585

8686
const supportedLinkFormats: LinkFormatInfo[] = [
87+
// 5: file content... [#181837]
88+
// 5:3 error [#181837]
8789
{ urlFormat: '{0}\r\n{1}:foo', line: '5' },
8890
{ urlFormat: '{0}\r\n{1}: foo', line: '5' },
8991
{ urlFormat: '{0}\r\n5:another link\r\n{1}:{2} foo', line: '5', column: '3' },
9092
{ urlFormat: '{0}\r\n {1}:{2} foo', line: '5', column: '3' },
9193
{ urlFormat: '{0}\r\n 5:6 error another one\r\n {1}:{2} error', line: '5', column: '3' },
9294
{ urlFormat: `{0}\r\n 5:6 error ${'a'.repeat(80)}\r\n {1}:{2} error`, line: '5', column: '3' },
95+
96+
// @@ ... <to-file-range> @@ content... [#182878] (tests check the entire line, so they don't include the line content at the end of the last @@)
97+
{ urlFormat: '+++ b/{0}\r\n@@ -7,6 +{1},7 @@', line: '5' },
98+
{ urlFormat: '+++ b/{0}\r\n@@ -1,1 +1,1 @@\r\nfoo\r\nbar\r\n@@ -7,6 +{1},7 @@', line: '5' },
9399
];
94100

95101
suite('Workbench - TerminalMultiLineLinkDetector', () => {

0 commit comments

Comments
 (0)