mirror of
https://github.com/NixOS/nix
synced 2025-07-09 03:43:54 +02:00
Clean up env var logic in preparation for Windows
It's a little weird we don't check the return status for these, but changing that would introduce risk so I did not. Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
This commit is contained in:
parent
6b889e0588
commit
ef2d10f7e7
8 changed files with 32 additions and 20 deletions
|
@ -91,7 +91,7 @@ namespace nix {
|
|||
}
|
||||
|
||||
TEST_F(PrimOpTest, getEnv) {
|
||||
setenv("_NIX_UNIT_TEST_ENV_VALUE", "test value", 1);
|
||||
setEnv("_NIX_UNIT_TEST_ENV_VALUE", "test value");
|
||||
auto v = eval("builtins.getEnv \"_NIX_UNIT_TEST_ENV_VALUE\"");
|
||||
ASSERT_THAT(v, IsStringEq("test value"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue