Merge from vscode 2cd495805cf99b31b6926f08ff4348124b2cf73d

This commit is contained in:
ADS Merger
2020-06-30 04:40:21 +00:00
committed by AzureDataStudio
parent a8a7559229
commit 1388493cc1
602 changed files with 16375 additions and 12940 deletions

View File

@@ -781,4 +781,29 @@ suite('TextModelSearch', () => {
model.dispose();
});
test('issue #100134. Zero-length matches should properly step over surrogate pairs', () => {
// 1[Laptop]1 - there shoud be no matches inside of [Laptop] emoji
assertFindMatches('1\uD83D\uDCBB1', '()', true, false, null,
[
[1, 1, 1, 1],
[1, 2, 1, 2],
[1, 4, 1, 4],
[1, 5, 1, 5],
]
);
// 1[Hacker Cat]1 = 1[Cat Face][ZWJ][Laptop]1 - there shoud be matches between emoji and ZWJ
// there shoud be no matches inside of [Cat Face] and [Laptop] emoji
assertFindMatches('1\uD83D\uDC31\u200D\uD83D\uDCBB1', '()', true, false, null,
[
[1, 1, 1, 1],
[1, 2, 1, 2],
[1, 4, 1, 4],
[1, 5, 1, 5],
[1, 7, 1, 7],
[1, 8, 1, 8]
]
);
});
});