Skip to content

Commit 7518104

Browse files
committed
Add tests for 633 E capability
1 parent 418a4e2 commit 7518104

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/vs/workbench/contrib/terminal/test/browser/xterm/shellIntegrationAddon.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,18 @@ suite('ShellIntegrationAddon', () => {
186186
await writeP(xterm, '\x1b]633;D;7\x07');
187187
mock.verify();
188188
});
189+
test('should pass command line sequence to the capability', async () => {
190+
const mock = shellIntegrationAddon.getCommandDetectionMock(xterm);
191+
mock.expects('setCommandLine').once().withExactArgs('', false);
192+
await writeP(xterm, '\x1b]633;E\x07');
193+
mock.verify();
194+
195+
const mock2 = shellIntegrationAddon.getCommandDetectionMock(xterm);
196+
mock2.expects('setCommandLine').twice().withExactArgs('cmd', false);
197+
await writeP(xterm, '\x1b]633;E;cmd\x07');
198+
await writeP(xterm, '\x1b]633;E;cmd;invalid-nonce\x07');
199+
mock2.verify();
200+
});
189201
test('should not activate capability on the cwd sequence (OSC 633 ; P=Cwd=<cwd> ST)', async () => {
190202
strictEqual(capabilities.has(TerminalCapability.CommandDetection), false);
191203
await writeP(xterm, 'foo');

0 commit comments

Comments
 (0)