From patchwork Wed Sep 13 22:46:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 813664 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="epeBVj6X"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xsxcf4SBFz9sPk for ; Thu, 14 Sep 2017 08:47:13 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 225EAC21DAC; Wed, 13 Sep 2017 22:47:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id AD91FC21CB6; Wed, 13 Sep 2017 22:47:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B0BCFC21CB6; Wed, 13 Sep 2017 22:47:02 +0000 (UTC) Received: from mail-qk0-f196.google.com (mail-qk0-f196.google.com [209.85.220.196]) by lists.denx.de (Postfix) with ESMTPS id 2497CC21CB0 for ; Wed, 13 Sep 2017 22:47:02 +0000 (UTC) Received: by mail-qk0-f196.google.com with SMTP id d70so995569qkc.1 for ; Wed, 13 Sep 2017 15:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=25xPxLX/4MwaS9eIhoHTmi+yebfBrgZ/NiQ1ZwBLrFA=; b=epeBVj6XrotzJRmICbzoXUXrDoe4ERkScy8wZWd3aqARqJnVozCyIa7ZLJZaDd8WDO n2zXru5ZdqgavjlSUD43KD6+G/pS5ZfXLK2zFIgFXvkLeO8yaDfAgShAJwU/GPjrBWsy OCXKlalJFA0Ri2iWpuFn4z3rCeEDSHisode8h1JwK7Ia4JyuFop17G91HlcQVzESzH6z EoJ0VwMnSeuMnZjA8vy7AG44MQBn4d4td+jv/TGFiHvW3Ov2gqNH3dooyT6LwpQWECK2 UuApP10BdTpTSNxDH284kaDmBVVeeAC+lXf+DPaoN/gyVWwzTa4sIIePOvbupRrvCNIh 9W6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=25xPxLX/4MwaS9eIhoHTmi+yebfBrgZ/NiQ1ZwBLrFA=; b=UWkH4dy30WXGBSVpk1sET8Bx6TILYw0WGB7dX51xFjiyIcWSSBKQdgfJlPY5iZ9azK +CjHeyL8ovE4hwOyEz+wI53rEf71zVSr6V/P0nq+NDsClv25dAIFFcHXQcCieO0O5lja 0IjaZKnjiWU2JyRRNMzBoqRuc0kNPdUvI51og1Jbh3KWQ20s3QUNBmFOo2q5Bcgc1sxx H2Jfhq6OQdj5yCo4nnBMvKnENIbE5HjrZHabRKrb9MIFmuMrXffflIubeo9k7pbd0USI ndHpHPMvteAixl8CIqEDs4Kgi724mAghVqFazjX8/Rq+3yzwtxNKq237qtKmFDFe4Wfi uMrQ== X-Gm-Message-State: AHPjjUjrJ+mozEEWSn8fXaU/WVOOvV3p12mfr2aHtzCuKLUeDF0e++2Y u36gk3u9kqxkWS0C+ww= X-Google-Smtp-Source: AOwi7QB/qyE5IoL3kI6FKuy08BlI5tao5iz+hORR20Akrd/8Fyj4s6DRchjTjaSxfDdDfBYIANS/6w== X-Received: by 10.55.78.151 with SMTP id c145mr119073qkb.105.1505342820545; Wed, 13 Sep 2017 15:47:00 -0700 (PDT) Received: from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a]) by smtp.gmail.com with ESMTPSA id t32sm10585290qtb.5.2017.09.13.15.46.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Sep 2017 15:46:59 -0700 (PDT) From: Rob Clark To: U-Boot Mailing List Date: Wed, 13 Sep 2017 18:46:54 -0400 Message-Id: <20170913224657.23321-1-robdclark@gmail.com> X-Mailer: git-send-email 2.13.5 Subject: [U-Boot] [PATCH] test: print_ut: Add test for %ls strings X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add a simple test for long strings. Signed-off-by: Rob Clark Reviewed-by: Simon Glass Reviewed-by: Simon Glass --- 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);