summaryrefslogtreecommitdiff
path: root/test/boot/cedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/boot/cedit.c')
-rw-r--r--test/boot/cedit.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/boot/cedit.c b/test/boot/cedit.c
index 26a69f0323f..7cf0c3e4e93 100644
--- a/test/boot/cedit.c
+++ b/test/boot/cedit.c
@@ -114,7 +114,7 @@ static int cedit_fdt(struct unit_test_state *uts)
}
BOOTSTD_TEST(cedit_fdt, 0);
-/* Check the cedit write_env command */
+/* Check the cedit write_env and read_env commands */
static int cedit_env(struct unit_test_state *uts)
{
struct video_priv *vid_priv;
@@ -142,6 +142,16 @@ static int cedit_env(struct unit_test_state *uts)
ut_asserteq(7, env_get_ulong("c.cpu-speed", 10, 0));
ut_asserteq_str("2.5 GHz", env_get("c.cpu-speed-str"));
+ /* reset the expo */
+ menu->cur_item_id = ID_CPU_SPEED_1;
+
+ ut_assertok(run_command("cedit read_env -v", 0));
+ ut_assert_nextlinen("c.cpu-speed=7");
+ ut_assert_nextlinen("c.power-loss=10");
+ ut_assert_console_end();
+
+ ut_asserteq(ID_CPU_SPEED_2, menu->cur_item_id);
+
return 0;
}
BOOTSTD_TEST(cedit_env, 0);