mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-21 06:01:39 +00:00
test/py: add test of setenv/printenv/echo
This tests basic environment variable functionality. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
472040d5cb
commit
5ab097abad
2 changed files with 221 additions and 4 deletions
|
@ -20,10 +20,6 @@ static int do_ut_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||
printf("%s: Testing commands\n", __func__);
|
||||
run_command("env default -f -a", 0);
|
||||
|
||||
/* run a single command */
|
||||
run_command("setenv single 1", 0);
|
||||
assert(!strcmp("1", getenv("single")));
|
||||
|
||||
/* make sure that compound statements work */
|
||||
#ifdef CONFIG_SYS_HUSH_PARSER
|
||||
run_command("if test -n ${single} ; then setenv check 1; fi", 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue