diff options
| author | Arslan Urtashev <[email protected]> | 2022-02-10 16:48:55 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:48:55 +0300 |
| commit | b97740540e7302cec9efa181e106ae1990a0cc1c (patch) | |
| tree | 1a2a0bfe523c3272d207e2d75254a41d3945a3bb /util/system | |
| parent | 31789673dc3562bc7540e00fe031ba84ae282c24 (diff) | |
Restoring authorship annotation for Arslan Urtashev <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'util/system')
| -rw-r--r-- | util/system/env.cpp | 6 | ||||
| -rw-r--r-- | util/system/env.h | 4 | ||||
| -rw-r--r-- | util/system/env_ut.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/util/system/env.cpp b/util/system/env.cpp index ead9b566a5f..19d570532a4 100644 --- a/util/system/env.cpp +++ b/util/system/env.cpp @@ -26,9 +26,9 @@ TString GetEnv(const TString& key, const TString& def) { size_t len = GetEnvironmentVariableA(key.data(), nullptr, 0); if (len == 0) { - if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) { - return def; - } + if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) { + return def; + } return TString{}; } diff --git a/util/system/env.h b/util/system/env.h index e2ccdd1e954..b8a31547107 100644 --- a/util/system/env.h +++ b/util/system/env.h @@ -5,8 +5,8 @@ /** * Search the environment list provided by the host environment for associated variable. * - * @param key String identifying the name of the environmental variable to look for - * @param def String that returns if environmental variable not found by key + * @param key String identifying the name of the environmental variable to look for + * @param def String that returns if environmental variable not found by key * * @return String that is associated with the matched environment variable or empty string if * such variable is missing. diff --git a/util/system/env_ut.cpp b/util/system/env_ut.cpp index e03cc016589..5b34b3ea64c 100644 --- a/util/system/env_ut.cpp +++ b/util/system/env_ut.cpp @@ -10,11 +10,11 @@ Y_UNIT_TEST_SUITE(EnvTest) { TString def = "Some default value for env var"; // first of all, it should be clear UNIT_ASSERT_VALUES_EQUAL(GetEnv(key), TString()); - UNIT_ASSERT_VALUES_EQUAL(GetEnv(key, def), def); + UNIT_ASSERT_VALUES_EQUAL(GetEnv(key, def), def); SetEnv(key, value); // set and see what value we get here UNIT_ASSERT_VALUES_EQUAL(GetEnv(key), value); - UNIT_ASSERT_VALUES_EQUAL(GetEnv(key, def), value); + UNIT_ASSERT_VALUES_EQUAL(GetEnv(key, def), value); // set empty value SetEnv(key, TString()); UNIT_ASSERT_VALUES_EQUAL(GetEnv(key), TString()); |
