]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/test/test-env-util.c
test-env-util: allow $PATH to be unset
[thirdparty/systemd.git] / src / test / test-env-util.c
index f57a26021c3042b52489d1a528547d5c7ec994a9..17dacda70f1f22d4efdf268ffa3d601c409d0f0b 100644 (file)
@@ -122,10 +122,10 @@ static void test_env_strv_get_n(void) {
 
         assert_se(!strv_env_get_n(env, "PATH__", 4, 0));
         assert_se(!strv_env_get_n(env, "PATH", 4, 0));
-        assert_se(streq(strv_env_get_n(env, "PATH__", 4, REPLACE_ENV_USE_ENVIRONMENT),
-                        getenv("PATH")));
-        assert_se(streq(strv_env_get_n(env, "PATH", 4, REPLACE_ENV_USE_ENVIRONMENT),
-                        getenv("PATH")));
+        assert_se(streq_ptr(strv_env_get_n(env, "PATH__", 4, REPLACE_ENV_USE_ENVIRONMENT),
+                            getenv("PATH")));
+        assert_se(streq_ptr(strv_env_get_n(env, "PATH", 4, REPLACE_ENV_USE_ENVIRONMENT),
+                            getenv("PATH")));
 }
 
 static void test_replace_env(bool braceless) {