|
4 | 4 | *--------------------------------------------------------------------------------------------*/
|
5 | 5 |
|
6 | 6 | import { deepStrictEqual, ok, strictEqual } from 'assert';
|
| 7 | +import { userInfo } from 'os'; |
7 | 8 | import { NullLogService } from 'vs/platform/log/common/log';
|
8 | 9 | import { ITerminalProcessOptions } from 'vs/platform/terminal/common/terminal';
|
9 | 10 | import { getShellIntegrationInjection, IShellIntegrationConfigInjection } from 'vs/platform/terminal/node/terminalEnvironment';
|
@@ -94,8 +95,14 @@ suite('platform - terminalEnvironment', () => {
|
94 | 95 | if (process.platform !== 'win32') {
|
95 | 96 | suite('zsh', () => {
|
96 | 97 | 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 | + ]; |
99 | 106 | const expectedSources = [
|
100 | 107 | /.+\/out\/vs\/workbench\/contrib\/terminal\/browser\/media\/shellIntegration-rc.zsh/,
|
101 | 108 | /.+\/out\/vs\/workbench\/contrib\/terminal\/browser\/media\/shellIntegration-profile.zsh/,
|
|
0 commit comments