summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/command_ut.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/command_ut.c b/test/command_ut.c
index 620a297..4f42056 100644
--- a/test/command_ut.c
+++ b/test/command_ut.c
@@ -65,7 +65,8 @@ static int do_ut_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
run_command("if test " expr " ; then " \
"setenv " #name "_" #expected_result " y; else " \
"setenv " #name "_" #expected_result " n; fi", 0); \
- assert(!strcmp(#expected_result, getenv(#name "_" #expected_result)));
+ assert(!strcmp(#expected_result, getenv(#name "_" #expected_result))); \
+ setenv(#name "_" #expected_result, NULL);
/* Basic operators */
HUSH_TEST(streq, "aaa = aaa", y);