emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org
Subject: test-org-cite/main-affixes failure
Date: Sat, 06 Nov 2021 13:44:02 -0400	[thread overview]
Message-ID: <875yt56uxp.fsf@kyleam.com> (raw)

Hi Nicolas,

test-org-cite/main-affixes, added in ad4028286 (oc: Refactor affixes
extraction, 2021-11-03), is failing on my end:

  $ BTEST_RE=main-affixes make test-dirty
  [...]
  Test test-org-cite/main-affixes condition:
      (ert-test-failed
       ((should
         (equal '...
  	(org-test-with-temp-text "[cite:@key1 post1;@key2 post2; global post]" ...)))
        :form
        (equal
         (nil "global post")
         (nil
  	#(" global post" 0 12 ...)))
        :value nil :explanation
        (list-elt 1
  		(arrays-of-different-length 11 12 "global post"
  					    #(" global post" 0 12 ...)
  					    first-mismatch-at 0))))
     FAILED  1/1  test-org-cite/main-affixes (0.009342 sec)
  [...]

Adding a space to the expected SUFFIX (as in the diff below) makes the
test pass for me and looks to be consistent with some of the other cases
in that test.

Does the current version of the test (no space) pass on your end?


diff --git a/testing/lisp/test-oc.el b/testing/lisp/test-oc.el
index c700780fe..896870303 100644
--- a/testing/lisp/test-oc.el
+++ b/testing/lisp/test-oc.el
@@ -286,7 +286,7 @@ (ert-deftest test-org-cite/main-affixes ()
           (org-test-with-temp-text "[cite:global pre;pre1 @key1;pre2 @key2]"
             (org-cite-main-affixes (org-element-context)))))
   (should
-   (equal '(nil . ("global post"))
+   (equal '(nil . (" global post"))
           (org-test-with-temp-text "[cite:@key1 post1;@key2 post2; global post]"
             (org-cite-main-affixes (org-element-context))))))
 


             reply	other threads:[~2021-11-06 17:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-06 17:44 Kyle Meyer [this message]
2021-11-06 20:44 ` test-org-cite/main-affixes failure Nicolas Goaziou
2021-11-06 21:19   ` Kyle Meyer
2021-11-06 21:53     ` Nicolas Goaziou

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875yt56uxp.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).