From: Rob Clark <robdclark@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] test: print_ut: Add test for %ls strings
Date: Wed, 13 Sep 2017 18:46:54 -0400 [thread overview]
Message-ID: <20170913224657.23321-1-robdclark@gmail.com> (raw)
Add a simple test for long strings.
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
test/print_ut.c | 3 +++
1 file changed, 3 insertions(+)
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);
--
2.13.5
next reply other threads:[~2017-09-13 22:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-13 22:46 Rob Clark [this message]
2017-09-17 17:54 ` [U-Boot] [PATCH] test: print_ut: Add test for %ls strings Simon Glass
2017-09-29 21:00 ` sjg at google.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170913224657.23321-1-robdclark@gmail.com \
--to=robdclark@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox