diff options
| author | Andrei Listochkin <andrei.listochkin@ferrous-systems.com> | 2022-05-11 13:28:08 +0100 |
|---|---|---|
| committer | Andrei Listochkin <andrei.listochkin@ferrous-systems.com> | 2022-05-11 15:50:25 +0100 |
| commit | 6c769ac00d12cc1436bdbb2bbbce80db0bb8d2d5 (patch) | |
| tree | f9e772201e405e078d34876e45ff565c2df04a6e /editors/code/tests | |
| parent | a86db5d0d15f736ec25229ddde62859ea15f306e (diff) | |
| download | rust-6c769ac00d12cc1436bdbb2bbbce80db0bb8d2d5.tar.gz rust-6c769ac00d12cc1436bdbb2bbbce80db0bb8d2d5.zip | |
handle references to external environment variables
use cross-env to enable env variables on Windows
Diffstat (limited to 'editors/code/tests')
| -rw-r--r-- | editors/code/tests/unit/settings.test.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/editors/code/tests/unit/settings.test.ts b/editors/code/tests/unit/settings.test.ts index 12734d15667..f4b022b421c 100644 --- a/editors/code/tests/unit/settings.test.ts +++ b/editors/code/tests/unit/settings.test.ts @@ -37,5 +37,17 @@ export async function getTests(ctx: Context) { const actualEnv = await substituteVariablesInEnv(envJson); assert.deepStrictEqual(actualEnv, expectedEnv); }); + + suite.addTest('Should support external variables', async () => { + const envJson = { + USING_EXTERNAL_VAR: "${env:TEST_VARIABLE} test ${env:TEST_VARIABLE}" + }; + const expectedEnv = { + USING_EXTERNAL_VAR: "test test test" + }; + + const actualEnv = await substituteVariablesInEnv(envJson); + assert.deepStrictEqual(actualEnv, expectedEnv); + }); }); } |
