parent
8042e9b5d5
commit
faccfff275
1 changed files with 8 additions and 6 deletions
|
@ -60,8 +60,9 @@ import { assertNoRpc } from '../utils';
|
||||||
test('echo works in the default shell', async () => {
|
test('echo works in the default shell', async () => {
|
||||||
const terminal = await new Promise<Terminal>(r => {
|
const terminal = await new Promise<Terminal>(r => {
|
||||||
disposables.push(window.onDidOpenTerminal(t => {
|
disposables.push(window.onDidOpenTerminal(t => {
|
||||||
strictEqual(terminal, t);
|
if (t === terminal) {
|
||||||
r(terminal);
|
r(terminal);
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
// Use a single character to avoid winpty/conpty issues with injected sequences
|
// Use a single character to avoid winpty/conpty issues with injected sequences
|
||||||
const terminal = window.createTerminal({
|
const terminal = window.createTerminal({
|
||||||
|
@ -73,10 +74,11 @@ import { assertNoRpc } from '../utils';
|
||||||
let data = '';
|
let data = '';
|
||||||
await new Promise<void>(r => {
|
await new Promise<void>(r => {
|
||||||
disposables.push(window.onDidWriteTerminalData(e => {
|
disposables.push(window.onDidWriteTerminalData(e => {
|
||||||
strictEqual(terminal, e.terminal);
|
if (e.terminal === terminal) {
|
||||||
data += e.data;
|
data += e.data;
|
||||||
if (data.indexOf('`') !== 0) {
|
if (data.indexOf('`') !== 0) {
|
||||||
r();
|
r();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
// Print an environment variable value so the echo statement doesn't get matched
|
// Print an environment variable value so the echo statement doesn't get matched
|
||||||
|
|
Loading…
Reference in a new issue