mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 18:48:00 +00:00
⚗️ Add tests to verify handling sequence OSC 9; 9 ; CWD ST
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
This commit is contained in:
parent
515c6c2a17
commit
c819318ba4
|
@ -113,6 +113,21 @@ suite('ShellIntegrationAddon', () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('detect `SetWindowsFrindlyCwd` sequence: `OSC 9 ; 9 ; <cwd> ST`', async () => {
|
||||
type TestCase = [title: string, input: string, expected: string];
|
||||
const cases: TestCase[] = [
|
||||
['root', '/', '/'],
|
||||
['non-root', '/some/path', '/some/path'],
|
||||
];
|
||||
for (const x of cases) {
|
||||
const [title, input, expected] = x;
|
||||
const mock = shellIntegrationAddon.getCwdDectionMock();
|
||||
mock.expects('updateCwd').once().withExactArgs(expected).named(title);
|
||||
await writeP(xterm, `\x1b]9;9;${input}\x07`);
|
||||
mock.verify();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
suite('command tracking', async () => {
|
||||
|
|
Loading…
Reference in a new issue