2021-02-03 07:47:02 +03:00
|
|
|
if (-not $IsLinux -and -not $IsMacOS) {
|
|
|
|
. $PSScriptRoot/../end-to-end-tests-prelude.ps1
|
|
|
|
|
|
|
|
$env:_VCPKG_TEST_TRACKED = "a"
|
|
|
|
$env:_VCPKG_TEST_UNTRACKED = "b"
|
|
|
|
|
2023-07-10 17:44:19 +03:00
|
|
|
$x = Run-VcpkgAndCaptureOutput "--overlay-triplets=$PSScriptRoot/../e2e-ports/env-passthrough" env "echo %_VCPKG_TEST_TRACKED% %_VCPKG_TEST_TRACKED2% %_VCPKG_TEST_UNTRACKED% %_VCPKG_TEST_UNTRACKED2%"
|
2022-10-12 01:28:03 +03:00
|
|
|
if ($x -ne "%_VCPKG_TEST_TRACKED% %_VCPKG_TEST_TRACKED2% %_VCPKG_TEST_UNTRACKED% %_VCPKG_TEST_UNTRACKED2%`r`n")
|
2021-02-03 07:47:02 +03:00
|
|
|
{
|
|
|
|
throw "env should have cleaned the environment ($x)"
|
|
|
|
}
|
|
|
|
|
2023-07-10 17:44:19 +03:00
|
|
|
$y = Run-VcpkgAndCaptureOutput "--overlay-triplets=$PSScriptRoot/../e2e-ports/env-passthrough" env --triplet passthrough "echo %_VCPKG_TEST_TRACKED% %_VCPKG_TEST_TRACKED2% %_VCPKG_TEST_UNTRACKED% %_VCPKG_TEST_UNTRACKED2%"
|
2022-10-12 01:28:03 +03:00
|
|
|
if ($y -ne "a %_VCPKG_TEST_TRACKED2% b %_VCPKG_TEST_UNTRACKED2%`r`n")
|
2021-02-03 07:47:02 +03:00
|
|
|
{
|
|
|
|
throw "env should have kept the environment ($y)"
|
|
|
|
}
|
|
|
|
|
|
|
|
rm env:_VCPKG_TEST_TRACKED
|
|
|
|
rm env:_VCPKG_TEST_UNTRACKED
|
|
|
|
}
|