From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gH0gLdkWYGKqRAEAbAwnHQ (envelope-from ) for ; Wed, 20 Apr 2022 16:21:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YKniLNkWYGIlAAEAauVa8A (envelope-from ) for ; Wed, 20 Apr 2022 16:21:13 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 52F25317E5 for ; Wed, 20 Apr 2022 16:21:13 +0200 (CEST) Received: from localhost ([::1]:59656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhBCi-0002nB-Fx for larch@yhetil.org; Wed, 20 Apr 2022 10:21:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhAMX-0005qh-RV for emacs-orgmode@gnu.org; Wed, 20 Apr 2022 09:27:18 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:44671) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhAMV-0004Ss-VZ for emacs-orgmode@gnu.org; Wed, 20 Apr 2022 09:27:17 -0400 Received: by mail-pf1-x435.google.com with SMTP id a15so1905884pfv.11 for ; Wed, 20 Apr 2022 06:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:in-reply-to:references:message-id:date:mime-version; bh=xQlgMXuyC/NmdRSkhWyeCxG/G3VOXPtVKq7I8yXT5AA=; b=FgKKVWBla+gC4Fhy3+MvNckloCnaqcrvPVUCkQXh6Rq7E5cSRwvEiz/oNOyqZBz3uJ EPRFM2GZxmV7TLubpTARujzQrJkknr3s0CmCzQTkymLpyub98yptizS2T7xu+xqSk540 3SyIaAxWgncUOJY0JeobGDG2Drnzb+oZv1ZsHM6UQP2niz7W+HuNhgY5B6Znog/EP/r9 xtcMakK5R0mD0g70YX0NaCjsigJNy2BMb9gqYUg87iq2dOUPQ/LGE7l6BH+Cn7rawQ97 P4QIhDNTmPoVOE2gZQnmzkJINNbPiBnlxSLntwFUZjgngGnLY2riyfCIAuvGL9gRb0u3 z0+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:in-reply-to:references :message-id:date:mime-version; bh=xQlgMXuyC/NmdRSkhWyeCxG/G3VOXPtVKq7I8yXT5AA=; b=O/lV1O55o1U5YzDDpGHHJHWCCO90BDX+Os8S85VmhcO2G+WO9eB3OS4mDO4ywx3BsU U6804/zXSkLlaZ4svoL+xuiwvaTYy0gVgS82yG5xT2vYG6NOwGW/cXDYw3x1c874ogwL PNjJUS8QPmcB8EEdboU6gS0cf3vySCFFVyB7YLfmDyzLiMTYr3JeEvK+Gar/F/jllavd FP5NyGKk2M0cg5A7k3aP9FccgJnRveyYqKvGBj7IouT2KJnC9F5nVNWwzezW0GMtvHSl Gjzg7O/I6Fj6c0l+PZASHTDtxZ5z2aznls1rdsPfZqxKrZ/+ETTb9f5n2c5ftsDpNpSv N/uw== X-Gm-Message-State: AOAM533tAxXnMGNS5KssTqjM5fIQ392hH2eQThuhjW/jeuzjcAa31M1k wuuaG0qH0flVkzqCc/M1e2zLz6wh/erzZQ== X-Google-Smtp-Source: ABdhPJwJkzzYmNb0l+sGsfw4QxTfSU3igdFtk/H3ohKVX5ktAdqG5sjjKoQ1fkkgfcN8NEY0k0zung== X-Received: by 2002:a62:2504:0:b0:505:7693:b48e with SMTP id l4-20020a622504000000b005057693b48emr23150700pfl.4.1650461234490; Wed, 20 Apr 2022 06:27:14 -0700 (PDT) Received: from localhost ([64.32.23.62]) by smtp.gmail.com with ESMTPSA id 132-20020a62168a000000b004f40e8b3133sm21012198pfw.188.2022.04.20.06.27.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 06:27:14 -0700 (PDT) From: Ihor Radchenko To: emacs-orgmode@gnu.org Subject: [PATCH v2 32/38] test-org/string-width: Add tests for strings with prefix properties In-Reply-To: References: Message-Id: Date: Wed, 20 Apr 2022 21:28:07 +0800 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=yantar92@gmail.com; helo=mail-pf1-x435.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1650464473; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=7NC4hkdvUJ3ewcq0srCStkSgPT8ynl+dyIKz72tHIvY=; b=BxSeDchW1fZTDQwJFMLoot6XJbfAE6JPEwRjdYAyo4oYrviFfwUU4ICq2TI/MoFlwo/oQ9 +hpbCmjBE61f83NXW7a4Fx9A7h9tcsHsqMOXd2n0MLNJBb+YiZFe4y667W97s9EcDAXLXk MoTeXuhsSlh2g1dlmGt6G8PFobqXC6yZzkCH2fFHSLdK7AseqgGOPfIkT9a/xvv8Y3MtDq +Jy+7doTqlVqUoOMRuRVkrqC5CVJqK/XPkX+OW0asF+cRX8wbkuxyHucuxNiP4Di5ieWAx 8tqThA90uBCA4Y5NGVwV2AlWNkk27HmojcShzTq8T4j7d0cra6sir905E8Hu2A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650464473; a=rsa-sha256; cv=none; b=IOclN5hYeAvhBt/vRWgvni8qvnol5h79Upjo6NvzhJ7NhGsBKB0O3Zk9LgjlXHbttMb8rb UXhRFzsHvUl3TrnFof6c6/nj/A2KUNrl2w5pr7UwNjB3r/RfBxCX4ctP9NQQe8SVN3T77e FnS3lnpxVGA5t1ws5atOKcHMr8PO1X+OXOiffaGx/vGd/hxbx8v+kCPvR2qw/nnRic1g/k sjrowJ+KjXgZSTEfU+EEogz6CuT8y1mflGYjmKljJ9ehFM9UUh6Zo0ANEGQbbV+1NTdKsL Zz4IRxJU1b+l51OEF3E2YVIKyypP1xtfjGm9XGOdxFp4qp7UkOxCuG6UjSKBjQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=FgKKVWBl; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 7.16 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=FgKKVWBl; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 52F25317E5 X-Spam-Score: 7.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: 60CInUTyHtbV --- testing/lisp/test-org-macs.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testing/lisp/test-org-macs.el b/testing/lisp/test-org-macs.el index 6a7ccea3c..05cef1281 100644 --- a/testing/lisp/test-org-macs.el +++ b/testing/lisp/test-org-macs.el @@ -65,7 +65,11 @@ (ert-deftest test-org/string-width () (should (= 4 (org-string-width #("123" 1 2 (display #("abc" 1 2 (invisible t))))))) ;; Test `space' property in `display'. - (should (= 2 (org-string-width #(" " 0 1 (display (space :width 2))))))) + (should (= 2 (org-string-width #(" " 0 1 (display (space :width 2)))))) + ;; Test `wrap-prefix' property. + (should (= 2 (org-string-width #("ab" 0 2 (wrap-prefix " "))))) + ;; Test `line-prefix' property. + (should (= 2 (org-string-width #("ab" 0 2 (line-prefix " ")))))) ;;; Regexp -- 2.35.1 -- Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg