Skip to content

Commit 50ad05a

Browse files
committed
Try fix vscode-zsh tests
1 parent 1de34ba commit 50ad05a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/vs/platform/terminal/test/node/terminalEnvironment.test.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { deepStrictEqual, ok, strictEqual } from 'assert';
7+
import { userInfo } from 'os';
78
import { NullLogService } from 'vs/platform/log/common/log';
89
import { ITerminalProcessOptions } from 'vs/platform/terminal/common/terminal';
910
import { getShellIntegrationInjection, IShellIntegrationConfigInjection } from 'vs/platform/terminal/node/terminalEnvironment';
@@ -94,8 +95,14 @@ suite('platform - terminalEnvironment', () => {
9495
if (process.platform !== 'win32') {
9596
suite('zsh', () => {
9697
suite('should override args', () => {
97-
const expectedDir = /.+\/vscode-zsh/;
98-
const expectedDests = [/.+\/vscode-zsh\/.zshrc/, /.+\/vscode-zsh\/.zprofile/, /.+\/vscode-zsh\/.zshenv/, /.+\/vscode-zsh\/.zlogin/];
98+
const username = userInfo().username;
99+
const expectedDir = new RegExp(`.+\/${username}-vscode-zsh`);
100+
const expectedDests = [
101+
new RegExp(`.+\/${username}-vscode-zsh\/\.zshrc`),
102+
new RegExp(`.+\/${username}-vscode-zsh\/\.zprofile`),
103+
new RegExp(`.+\/${username}-vscode-zsh\/\.zshenv`),
104+
new RegExp(`.+\/${username}-vscode-zsh\/\.zlogin`)
105+
];
99106
const expectedSources = [
100107
/.+\/out\/vs\/workbench\/contrib\/terminal\/browser\/media\/shellIntegration-rc.zsh/,
101108
/.+\/out\/vs\/workbench\/contrib\/terminal\/browser\/media\/shellIntegration-profile.zsh/,

0 commit comments

Comments
 (0)