diff options
author | Tom Rini <trini@konsulko.com> | 2024-04-02 07:03:25 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-04-02 07:03:25 -0400 |
commit | d312d9831f25a8e70d64df46fb2fe9aab2e8c939 (patch) | |
tree | 9afa8b258222e66221f8239d8ad51372d63c5ac3 /test/cmd/setexpr.c | |
parent | 25049ad560826f7dc1c4740883b0016014a59789 (diff) | |
parent | bc39e06778168a34bb4e0a34fbee4edbde4414d8 (diff) |
Merge branch 'next'
Merge in all changes from the next branch now that the release is out.
Diffstat (limited to 'test/cmd/setexpr.c')
-rw-r--r-- | test/cmd/setexpr.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/cmd/setexpr.c b/test/cmd/setexpr.c index 312593e1e32..ee329e94b85 100644 --- a/test/cmd/setexpr.c +++ b/test/cmd/setexpr.c @@ -179,6 +179,16 @@ static int setexpr_test_regex(struct unit_test_state *uts) val = env_get("mary"); ut_asserteq_str("this is a test", val); + /* No match */ + ut_assertok(run_command("setenv fred 'this is a test'", 0)); + ut_assertok(run_command("setenv mary ''", 0)); + ut_assertok(run_command("setexpr fred gsub us is \"${fred}\"", 0)); + ut_assertok(run_command("setexpr mary gsub us is \"${fred}\"", 0)); + val = env_get("fred"); + ut_asserteq_str("this is a test", val); + val = env_get("mary"); + ut_asserteq_str("this is a test", val); + unmap_sysmem(buf); return 0; |