mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79 (#14050)
* Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79 * Fix breaks * Extension management fixes * Fix breaks in windows bundling * Fix/skip failing tests * Update distro * Add clear to nuget.config * Add hygiene task * Bump distro * Fix hygiene issue * Add build to hygiene exclusion * Update distro * Update hygiene * Hygiene exclusions * Update tsconfig * Bump distro for server breaks * Update build config * Update darwin path * Add done calls to notebook tests * Skip failing tests * Disable smoke tests
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { CharCode } from 'vs/base/common/charCode';
|
||||
import { splitLines } from 'vs/base/common/strings';
|
||||
import { Range } from 'vs/editor/common/core/range';
|
||||
import { DefaultEndOfLine, ITextBuffer, ITextBufferBuilder, ValidAnnotatedEditOperation } from 'vs/editor/common/model';
|
||||
|
||||
@@ -34,7 +35,7 @@ export function getRandomString(minLength: number, maxLength: number): string {
|
||||
export function generateRandomEdits(chunks: string[], editCnt: number): ValidAnnotatedEditOperation[] {
|
||||
let lines: string[] = [];
|
||||
for (const chunk of chunks) {
|
||||
let newLines = chunk.split(/\r\n|\r|\n/);
|
||||
let newLines = splitLines(chunk);
|
||||
if (lines.length === 0) {
|
||||
lines.push(...newLines);
|
||||
} else {
|
||||
@@ -64,7 +65,7 @@ export function generateRandomEdits(chunks: string[], editCnt: number): ValidAnn
|
||||
export function generateSequentialInserts(chunks: string[], editCnt: number): ValidAnnotatedEditOperation[] {
|
||||
let lines: string[] = [];
|
||||
for (const chunk of chunks) {
|
||||
let newLines = chunk.split(/\r\n|\r|\n/);
|
||||
let newLines = splitLines(chunk);
|
||||
if (lines.length === 0) {
|
||||
lines.push(...newLines);
|
||||
} else {
|
||||
@@ -96,7 +97,7 @@ export function generateSequentialInserts(chunks: string[], editCnt: number): Va
|
||||
export function generateRandomReplaces(chunks: string[], editCnt: number, searchStringLen: number, replaceStringLen: number): ValidAnnotatedEditOperation[] {
|
||||
let lines: string[] = [];
|
||||
for (const chunk of chunks) {
|
||||
let newLines = chunk.split(/\r\n|\r|\n/);
|
||||
let newLines = splitLines(chunk);
|
||||
if (lines.length === 0) {
|
||||
lines.push(...newLines);
|
||||
} else {
|
||||
|
||||
@@ -14,6 +14,7 @@ import { PieceTreeTextBufferBuilder } from 'vs/editor/common/model/pieceTreeText
|
||||
import { NodeColor, SENTINEL, TreeNode } from 'vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase';
|
||||
import { createTextModel } from 'vs/editor/test/common/editorTestUtils';
|
||||
import { SearchData } from 'vs/editor/common/model/textModelSearch';
|
||||
import { splitLines } from 'vs/base/common/strings';
|
||||
|
||||
const alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n';
|
||||
|
||||
@@ -75,7 +76,7 @@ function trimLineFeed(text: string): string {
|
||||
//#region Assertion
|
||||
|
||||
function testLinesContent(str: string, pieceTable: PieceTreeBase) {
|
||||
let lines = str.split(/\r\n|\r|\n/);
|
||||
let lines = splitLines(str);
|
||||
assert.equal(pieceTable.getLineCount(), lines.length);
|
||||
assert.equal(pieceTable.getLinesRawContent(), str);
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
@@ -997,7 +998,7 @@ suite('CRLF', () => {
|
||||
pieceTable.delete(2, 3);
|
||||
str = str.substring(0, 2) + str.substring(2 + 3);
|
||||
|
||||
let lines = str.split(/\r\n|\r|\n/);
|
||||
let lines = splitLines(str);
|
||||
assert.equal(pieceTable.getLineCount(), lines.length);
|
||||
assertTreeInvariants(pieceTable);
|
||||
});
|
||||
@@ -1012,7 +1013,7 @@ suite('CRLF', () => {
|
||||
pieceTable.delete(4, 1);
|
||||
str = str.substring(0, 4) + str.substring(4 + 1);
|
||||
|
||||
let lines = str.split(/\r\n|\r|\n/);
|
||||
let lines = splitLines(str);
|
||||
assert.equal(pieceTable.getLineCount(), lines.length);
|
||||
assertTreeInvariants(pieceTable);
|
||||
});
|
||||
@@ -1033,7 +1034,7 @@ suite('CRLF', () => {
|
||||
pieceTable.insert(3, '\r\r\r\n');
|
||||
str = str.substring(0, 3) + '\r\r\r\n' + str.substring(3);
|
||||
|
||||
let lines = str.split(/\r\n|\r|\n/);
|
||||
let lines = splitLines(str);
|
||||
assert.equal(pieceTable.getLineCount(), lines.length);
|
||||
assertTreeInvariants(pieceTable);
|
||||
});
|
||||
@@ -1205,7 +1206,7 @@ suite('centralized lineStarts with CRLF', () => {
|
||||
pieceTable.delete(2, 3);
|
||||
str = str.substring(0, 2) + str.substring(2 + 3);
|
||||
|
||||
let lines = str.split(/\r\n|\r|\n/);
|
||||
let lines = splitLines(str);
|
||||
assert.equal(pieceTable.getLineCount(), lines.length);
|
||||
assertTreeInvariants(pieceTable);
|
||||
});
|
||||
@@ -1218,7 +1219,7 @@ suite('centralized lineStarts with CRLF', () => {
|
||||
pieceTable.delete(4, 1);
|
||||
str = str.substring(0, 4) + str.substring(4 + 1);
|
||||
|
||||
let lines = str.split(/\r\n|\r|\n/);
|
||||
let lines = splitLines(str);
|
||||
assert.equal(pieceTable.getLineCount(), lines.length);
|
||||
assertTreeInvariants(pieceTable);
|
||||
});
|
||||
@@ -1238,7 +1239,7 @@ suite('centralized lineStarts with CRLF', () => {
|
||||
pieceTable.insert(3, '\r\r\r\n');
|
||||
str = str.substring(0, 3) + '\r\r\r\n' + str.substring(3);
|
||||
|
||||
let lines = str.split(/\r\n|\r|\n/);
|
||||
let lines = splitLines(str);
|
||||
assert.equal(pieceTable.getLineCount(), lines.length);
|
||||
assertTreeInvariants(pieceTable);
|
||||
});
|
||||
|
||||
@@ -411,7 +411,7 @@ suite('TextModelWithTokens', () => {
|
||||
|
||||
suite('TextModelWithTokens regression tests', () => {
|
||||
|
||||
test('Microsoft/monaco-editor#122: Unhandled Exception: TypeError: Unable to get property \'replace\' of undefined or null reference', () => {
|
||||
test('microsoft/monaco-editor#122: Unhandled Exception: TypeError: Unable to get property \'replace\' of undefined or null reference', () => {
|
||||
function assertViewLineTokens(model: TextModel, lineNumber: number, forceTokenization: boolean, expected: ViewLineToken[]): void {
|
||||
if (forceTokenization) {
|
||||
model.forceTokenization(lineNumber);
|
||||
@@ -488,7 +488,7 @@ suite('TextModelWithTokens regression tests', () => {
|
||||
});
|
||||
|
||||
|
||||
test('Microsoft/monaco-editor#133: Error: Cannot read property \'modeId\' of undefined', () => {
|
||||
test('microsoft/monaco-editor#133: Error: Cannot read property \'modeId\' of undefined', () => {
|
||||
|
||||
const languageIdentifier = new LanguageIdentifier('testMode', LanguageId.PlainText);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user