summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/boot/expo.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/boot/expo.c b/test/boot/expo.c
index 96c5943f394..a50e9f721de 100644
--- a/test/boot/expo.c
+++ b/test/boot/expo.c
@@ -707,6 +707,7 @@ static int expo_test_build(struct unit_test_state *uts)
struct scene_obj_menu *menu;
struct scene_menitem *item;
struct scene_obj_txt *txt;
+ struct abuf orig, *copy;
struct scene_obj *obj;
struct scene *scn;
struct expo *exp;
@@ -774,6 +775,16 @@ static int expo_test_build(struct unit_test_state *uts)
count = list_count_nodes(&menu->item_head);
ut_asserteq(3, count);
+ /* try editing some text */
+ ut_assertok(expo_edit_str(exp, txt->gen.str_id, &orig, &copy));
+ ut_asserteq_str("2 GHz", orig.data);
+ ut_asserteq_str("2 GHz", copy->data);
+
+ /* change it and check that things look right */
+ abuf_printf(copy, "atlantic %d", 123);
+ ut_asserteq_str("2 GHz", orig.data);
+ ut_asserteq_str("atlantic 123", copy->data);
+
expo_destroy(exp);
return 0;