From: Rob Clark Date: Wed, 13 Sep 2017 22:46:54 +0000 (-0400) Subject: test: print_ut: Add test for %ls strings X-Git-Tag: v2017.11-rc2~62^2~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=085391b22349b453aefad677853ff2d9955dd967;p=u-boot test: print_ut: Add test for %ls strings Add a simple test for long strings. Signed-off-by: Rob Clark Reviewed-by: Simon Glass --- diff --git a/test/print_ut.c b/test/print_ut.c index baad289972..a42c554bef 100644 --- a/test/print_ut.c +++ b/test/print_ut.c @@ -36,6 +36,9 @@ static int do_ut_print(cmd_tbl_t *cmdtp, int flag, int argc, snprintf(str, 0, "testing none"); assert(*str == 'x'); + sprintf(big_str, "_%ls_", L"foo"); + assert(!strcmp("_foo_", big_str)); + /* Test the banner function */ s = display_options_get_banner(true, str, sizeof(str)); assert(s == str);