From 35abaaf6063cba33874402490974ccac42d535ba Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 16 Feb 2021 08:08:09 -0800 Subject: [PATCH] Log all lines in failing test --- .../src/singlefolder-tests/terminal.test.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts index 5565059085c..9d84e92250a 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts @@ -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(r => { + console.log(' test 2'); disposables.push(window.onDidOpenTerminal(t => { + console.log(' test 3'); strictEqual(terminal, t); r(terminal); })); + console.log(' test 4'); // Use a single character to avoid winpty/conpty issues with injected sequences const terminal = window.createTerminal({ env: { TEST: '`' } }); + console.log(' test 5'); terminal.show(); }); + console.log(' test 6'); let data = ''; await new Promise(r => { + console.log(' test 7'); disposables.push(window.onDidWriteTerminalData(e => { + console.log(' test 8'); strictEqual(terminal, e.terminal); data += e.data; if (data.indexOf('`') !== 0) { + console.log(' test 9'); r(); } })); // Print an environment variable value so the echo statement doesn't get matched if (process.platform === 'win32') { + console.log(' test 10'); terminal.sendText(`$env:TEST`); } else { + console.log(' test 11'); terminal.sendText(`echo $TEST`); } }); + console.log(' test 12'); await new Promise(r => { + console.log(' test 1'); terminal.dispose(); + console.log(' test 14'); disposables.push(window.onDidCloseTerminal(t => { + console.log(' test 15'); strictEqual(terminal, t); r(); }));