Skip to contentSkip to conversation

test: print_ut: Add test for %ls strings

PATCH New Rob Clark 3 participants 3 messages Sep 13, 2017 – Sep 29, 2017

lore
Share & tools
lore

Rob Clark

author
#0 lore raw

PATCH 1/1 test: print_ut: Add test for %ls strings

Add a simple test for long strings.

---
 test/print_ut.c | 3 +++
 1 file changed, 3 insertions(+)
test/print_ut.c +3 -0
index baad289972..a42c554bef 100644
@@ -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);
Signature · 1 line
2.13.5