Log all lines in failing test
This commit is contained in:
parent
3859ba936d
commit
35abaaf606
1 changed files with 16 additions and 1 deletions
|
@ -55,39 +55,54 @@ import { assertNoRpc } from '../utils';
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.skip('echo works in the default shell', async () => {
|
test('echo works in the default shell', async () => {
|
||||||
|
console.log(' test 1');
|
||||||
const terminal = await new Promise<Terminal>(r => {
|
const terminal = await new Promise<Terminal>(r => {
|
||||||
|
console.log(' test 2');
|
||||||
disposables.push(window.onDidOpenTerminal(t => {
|
disposables.push(window.onDidOpenTerminal(t => {
|
||||||
|
console.log(' test 3');
|
||||||
strictEqual(terminal, t);
|
strictEqual(terminal, t);
|
||||||
r(terminal);
|
r(terminal);
|
||||||
}));
|
}));
|
||||||
|
console.log(' test 4');
|
||||||
// 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({
|
||||||
env: { TEST: '`' }
|
env: { TEST: '`' }
|
||||||
});
|
});
|
||||||
|
console.log(' test 5');
|
||||||
terminal.show();
|
terminal.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log(' test 6');
|
||||||
let data = '';
|
let data = '';
|
||||||
await new Promise<void>(r => {
|
await new Promise<void>(r => {
|
||||||
|
console.log(' test 7');
|
||||||
disposables.push(window.onDidWriteTerminalData(e => {
|
disposables.push(window.onDidWriteTerminalData(e => {
|
||||||
|
console.log(' test 8');
|
||||||
strictEqual(terminal, e.terminal);
|
strictEqual(terminal, e.terminal);
|
||||||
data += e.data;
|
data += e.data;
|
||||||
if (data.indexOf('`') !== 0) {
|
if (data.indexOf('`') !== 0) {
|
||||||
|
console.log(' test 9');
|
||||||
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
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
|
console.log(' test 10');
|
||||||
terminal.sendText(`$env:TEST`);
|
terminal.sendText(`$env:TEST`);
|
||||||
} else {
|
} else {
|
||||||
|
console.log(' test 11');
|
||||||
terminal.sendText(`echo $TEST`);
|
terminal.sendText(`echo $TEST`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log(' test 12');
|
||||||
await new Promise<void>(r => {
|
await new Promise<void>(r => {
|
||||||
|
console.log(' test 1');
|
||||||
terminal.dispose();
|
terminal.dispose();
|
||||||
|
console.log(' test 14');
|
||||||
disposables.push(window.onDidCloseTerminal(t => {
|
disposables.push(window.onDidCloseTerminal(t => {
|
||||||
|
console.log(' test 15');
|
||||||
strictEqual(terminal, t);
|
strictEqual(terminal, t);
|
||||||
r();
|
r();
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in a new issue