From 8112aeb6df18d2cba00212a0b036f8e51ae7c891 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 16 Jul 2024 22:14:26 -0400 Subject: Avoid use of clobbered environment in test --- test/test_string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/test_string.c') diff --git a/test/test_string.c b/test/test_string.c index 48021ed..028b7da 100644 --- a/test/test_string.c +++ b/test/test_string.c @@ -21,10 +21,10 @@ main(void) #ifndef _WIN32 char* s = NULL; - const char* const home = getenv("HOME"); - setenv("LILV_TEST_1", "test", 1); + const char* const home = getenv("HOME"); + assert(!strcmp((s = lilv_expand("$LILV_TEST_1")), "test")); free(s); if (home) { -- cgit v1.2.1