mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { deepStrictEqual, doesNotThrow, equal, ok, strictEqual, throws } from 'assert';
|
||||
import { ConfigurationTarget, Disposable, env, EnvironmentVariableCollection, EnvironmentVariableMutator, EnvironmentVariableMutatorOptions, EnvironmentVariableMutatorType, EnvironmentVariableScope, EventEmitter, ExtensionContext, extensions, ExtensionTerminalOptions, Pseudoterminal, Terminal, TerminalDimensions, TerminalExitReason, TerminalOptions, TerminalState, UIKind, Uri, window, workspace } from 'vscode';
|
||||
import { commands, ConfigurationTarget, Disposable, env, EnvironmentVariableCollection, EnvironmentVariableMutator, EnvironmentVariableMutatorOptions, EnvironmentVariableMutatorType, EnvironmentVariableScope, EventEmitter, ExtensionContext, extensions, ExtensionTerminalOptions, Pseudoterminal, Terminal, TerminalDimensions, TerminalExitReason, TerminalOptions, TerminalState, UIKind, Uri, window, workspace } from 'vscode';
|
||||
import { assertNoRpc, poll } from '../utils';
|
||||
|
||||
// Disable terminal tests:
|
||||
@@ -347,6 +347,27 @@ import { assertNoRpc, poll } from '../utils';
|
||||
});
|
||||
});
|
||||
|
||||
suite('selection', () => {
|
||||
test('should be undefined immediately after creation', async () => {
|
||||
const terminal = window.createTerminal({ name: 'bg', hideFromUser: true });
|
||||
equal(terminal.selection, undefined);
|
||||
terminal.dispose();
|
||||
});
|
||||
test('should be defined after selecting all content', async () => {
|
||||
const terminal = window.createTerminal({ name: 'bg', hideFromUser: true });
|
||||
await commands.executeCommand('workbench.action.terminal.selectAll');
|
||||
// TODO: Need to poll?
|
||||
terminal.dispose();
|
||||
});
|
||||
test('should be undefined after clearing a selection', async () => {
|
||||
const terminal = window.createTerminal({ name: 'bg', hideFromUser: true });
|
||||
await commands.executeCommand('workbench.action.terminal.selectAll');
|
||||
// TODO: Need to poll?
|
||||
await commands.executeCommand('workbench.action.terminal.clearSelection');
|
||||
terminal.dispose();
|
||||
});
|
||||
});
|
||||
|
||||
suite('window.onDidWriteTerminalData', () => {
|
||||
test('should listen to all future terminal data events', (done) => {
|
||||
const openEvents: string[] = [];
|
||||
|
||||
Reference in New Issue
Block a user