projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d3aaa3
)
test: print_ut: Add test for %ls strings
author
Rob Clark
<robdclark@gmail.com>
Wed, 13 Sep 2017 22:46:54 +0000
(18:46 -0400)
committer
Simon Glass
<sjg@chromium.org>
Mon, 9 Oct 2017 02:08:19 +0000
(20:08 -0600)
Add a simple test for long strings.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
test/print_ut.c
patch
|
blob
|
history
diff --git
a/test/print_ut.c
b/test/print_ut.c
index baad289972577e6e0b63e408ceb0e85379c88572..a42c554bef8d563b86334c06671878cfced0a1a3 100644
(file)
--- 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);