summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-10-30 08:45:44 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-10-30 08:45:44 +0100
commit24c46cf3e5d311fda4c8d04fccf971e6dd1d3950 (patch)
treeee973b470e0000721097b9236cf9613d5060fe14 /tests
parent1a5ff442cbc0877f5726966ce2984a965d894dc6 (diff)
downloadweechat-24c46cf3e5d311fda4c8d04fccf971e6dd1d3950.zip
tests: check that environment variable "HOME" is set before using it
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/core/test-core-string.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/unit/core/test-core-string.cpp b/tests/unit/core/test-core-string.cpp
index ea4722e38..a3e22ee2c 100644
--- a/tests/unit/core/test-core-string.cpp
+++ b/tests/unit/core/test-core-string.cpp
@@ -903,6 +903,7 @@ TEST(CoreString, ExpandHome)
int length_home;
home = getenv ("HOME");
+ CHECK(home);
length_home = strlen (home);
POINTERS_EQUAL(NULL, string_expand_home (NULL));
@@ -927,6 +928,7 @@ TEST(CoreString, EvalPathHome)
struct t_hashtable *extra_vars, *options;
home = getenv ("HOME");
+ CHECK(home);
length_home = strlen (home);
length_weechat_config_dir = strlen (weechat_config_dir);