summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2018-11-10 19:55:48 +0100
committerAnatolij Gustschin <agust@denx.de>2018-11-17 11:35:39 +0100
commit118f020d9a6d84b52cd533cfe5b02feae7e5bdde (patch)
tree892af3a970d4d1449a78539945d9aea449cca600 /test
parent1d6edcbfed2af33c748f2beb399810a0441888da (diff)
dm: video: correctly set the cursor position
The terminal escape sequence ESC [ <x> ; <y> H is used to set the cursor position. According to the ECMA 48 standard the upper left corner in the escape sequences is [1, 1]. The video uclass uses [0, 0] as upper left corner. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/dm/video.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/dm/video.c b/test/dm/video.c
index 7def338058..5d1faac19c 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -178,12 +178,12 @@ static int dm_test_video_ansi(struct unit_test_state *uts)
/* test set-cursor: [%d;%df */
vidconsole_put_string(con, "abc"ANSI_ESC"[2;2fab"ANSI_ESC"[4;4fcd");
- ut_asserteq(142, compress_frame_buffer(dev));
+ ut_asserteq(143, compress_frame_buffer(dev));
/* test colors (30-37 fg color, 40-47 bg color) */
vidconsole_put_string(con, ANSI_ESC"[30;41mfoo"); /* black on red */
vidconsole_put_string(con, ANSI_ESC"[33;44mbar"); /* yellow on blue */
- ut_asserteq(265, compress_frame_buffer(dev));
+ ut_asserteq(272, compress_frame_buffer(dev));
return 0;
}