UnicodeService & provider
This commit is contained in:
@@ -3,13 +3,14 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IBufferService, ICoreService, ILogService, IOptionsService, ITerminalOptions, IPartialTerminalOptions, IDirtyRowService, ICoreMouseService } from 'common/services/Services';
|
||||
import { IBufferService, ICoreService, ILogService, IOptionsService, ITerminalOptions, IPartialTerminalOptions, IDirtyRowService, ICoreMouseService, IUnicodeService, IUnicodeVersionProvider } from 'common/services/Services';
|
||||
import { IEvent, EventEmitter } from 'common/EventEmitter';
|
||||
import { clone } from 'common/Clone';
|
||||
import { DEFAULT_OPTIONS } from 'common/services/OptionsService';
|
||||
import { IBufferSet, IBuffer } from 'common/buffer/Types';
|
||||
import { BufferSet } from 'common/buffer/BufferSet';
|
||||
import { IDecPrivateModes, ICoreMouseEvent, CoreMouseEventType } from 'common/Types';
|
||||
import { UnicodeV6 } from 'common/input/UnicodeV6';
|
||||
|
||||
export class MockBufferService implements IBufferService {
|
||||
serviceBrand: any;
|
||||
@@ -90,3 +91,18 @@ export class MockOptionsService implements IOptionsService {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
}
|
||||
|
||||
// defaults to V6 always to keep tests passing
|
||||
export class MockUnicodeService implements IUnicodeService {
|
||||
private _provider = new UnicodeV6();
|
||||
register(provider: IUnicodeVersionProvider): void {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
versions: string[] = [];
|
||||
activeVersion: string = '';
|
||||
onChange: IEvent<string> = new EventEmitter<string>().event;
|
||||
wcwidth = (codepoint: number) => this._provider.wcwidth(codepoint);
|
||||
getStringCellWidth(s: string): number {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user