mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-04 08:05:34 +08:00
9a81392e48
* [vcpkg] Add VCPKG_ENV_PASSTHROUGH_UNTRACKED * [vcpkg] CR comments Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
21 lines
974 B
PowerShell
21 lines
974 B
PowerShell
if (-not $IsLinux -and -not $IsMacOS) {
|
|
. $PSScriptRoot/../end-to-end-tests-prelude.ps1
|
|
|
|
$env:_VCPKG_TEST_TRACKED = "a"
|
|
$env:_VCPKG_TEST_UNTRACKED = "b"
|
|
|
|
$x = ./vcpkg "--overlay-triplets=$PSScriptRoot/../../testing/env-passthrough" env "echo %_VCPKG_TEST_TRACKED% %_VCPKG_TEST_TRACKED2% %_VCPKG_TEST_UNTRACKED% %_VCPKG_TEST_UNTRACKED2%"
|
|
if ($x -ne "%_VCPKG_TEST_TRACKED% %_VCPKG_TEST_TRACKED2% %_VCPKG_TEST_UNTRACKED% %_VCPKG_TEST_UNTRACKED2%")
|
|
{
|
|
throw "env should have cleaned the environment ($x)"
|
|
}
|
|
|
|
$y = ./vcpkg "--overlay-triplets=$PSScriptRoot/../../testing/env-passthrough" env --triplet passthrough "echo %_VCPKG_TEST_TRACKED% %_VCPKG_TEST_TRACKED2% %_VCPKG_TEST_UNTRACKED% %_VCPKG_TEST_UNTRACKED2%"
|
|
if ($y -ne "a %_VCPKG_TEST_TRACKED2% b %_VCPKG_TEST_UNTRACKED2%")
|
|
{
|
|
throw "env should have kept the environment ($y)"
|
|
}
|
|
|
|
rm env:_VCPKG_TEST_TRACKED
|
|
rm env:_VCPKG_TEST_UNTRACKED
|
|
} |