mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 01:25:38 -05:00
Merge from vscode 5b9869eb02fa4c96205a74d05cad9164dfd06d60 (#5607)
This commit is contained in:
@@ -9,20 +9,19 @@ import * as stream from 'vs/base/node/stream';
|
||||
import { getPathFromAmdModule } from 'vs/base/common/amd';
|
||||
|
||||
suite('Stream', () => {
|
||||
test('readToMatchingString - ANSI', function () {
|
||||
test('readToMatchingString - ANSI', async () => {
|
||||
const file = getPathFromAmdModule(require, './fixtures/file.css');
|
||||
|
||||
return stream.readToMatchingString(file, '\n', 10, 100).then((result: string) => {
|
||||
// \r may be present on Windows
|
||||
assert.equal(result.replace('\r', ''), '/*---------------------------------------------------------------------------------------------');
|
||||
});
|
||||
const result = await stream.readToMatchingString(file, '\n', 10, 100);
|
||||
|
||||
// \r may be present on Windows
|
||||
assert.equal(result!.replace('\r', ''), '/*---------------------------------------------------------------------------------------------');
|
||||
});
|
||||
|
||||
test('readToMatchingString - empty', function () {
|
||||
test('readToMatchingString - empty', async () => {
|
||||
const file = getPathFromAmdModule(require, './fixtures/empty.txt');
|
||||
|
||||
return stream.readToMatchingString(file, '\n', 10, 100).then((result: string) => {
|
||||
assert.equal(result, null);
|
||||
});
|
||||
const result = await stream.readToMatchingString(file, '\n', 10, 100);
|
||||
assert.equal(result, null);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user