emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Garbs via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: emacs-orgmode@gnu.org
Subject: [PATCH] testing/lisp/test-org-archive.el: Fix test
Date: Wed, 13 Jan 2021 23:09:39 +0100	[thread overview]
Message-ID: <20210113220939.sbkhyefniyvsypah@cgarbs.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 537 bytes --]

Hello,

I've run across a test error on the current HEAD.
When I run "make test" on my system, then test-org-archive/datetree
fails.

The test fails because the expected output should contain "Sunday",
but with a German locale the generated text is "Sonntag" instead
(which is the German translation of "Sunday").

The attached patch fixed the test for me.

Best regards
Christian
-- 
....Christian.Garbs....................................https://www.cgarbs.de

Q:  What's a light-year?
A:  One-third less calories than a regular year.

[-- Attachment #2: 0001-testing-lisp-test-org-archive.el-Fix-test.patch --]
[-- Type: text/x-diff, Size: 2144 bytes --]

From 94055073ce79080be360070b86dcd5f2c074c9d3 Mon Sep 17 00:00:00 2001
From: Christian Garbs <mitch@cgarbs.de>
Date: Wed, 13 Jan 2021 22:57:21 +0100
Subject: [PATCH] testing/lisp/test-org-archive.el: Fix test

* testing/lisp/test-org-archive.el
(test-org-archive/datetree): Fix test for locales that don't use
English weekday names.
---
 testing/lisp/test-org-archive.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/testing/lisp/test-org-archive.el b/testing/lisp/test-org-archive.el
index 71ab427d2..d24a54794 100644
--- a/testing/lisp/test-org-archive.el
+++ b/testing/lisp/test-org-archive.el
@@ -63,7 +63,7 @@
     ;; Test in buffer target with no additional subheadings...
     (should
      (string-match-p
-      (regexp-quote "*** 2020-07-05 Sunday\n**** a")
+      (regexp-quote (format-time-string "*** 2020-07-05 %A\n**** a"))
       (org-test-with-temp-text-in-file "* a\n"
 	(let ((org-archive-location "::datetree/"))
 	  (org-archive-subtree)
@@ -71,7 +71,7 @@
     ;; ... and with `org-odd-levels-only' non-nil.
     (should
      (string-match-p
-      (regexp-quote "***** 2020-07-05 Sunday\n******* a")
+      (regexp-quote (format-time-string "***** 2020-07-05 %A\n******* a"))
       (org-test-with-temp-text-in-file "* a\n"
 	(let ((org-archive-location "::datetree/")
 	      (org-odd-levels-only t))
@@ -80,7 +80,7 @@
     ;; Test in buffer target with an additional subheading...
     (should
      (string-match-p
-      (regexp-quote "*** 2020-07-05 Sunday\n**** a\n***** b")
+      (regexp-quote (format-time-string "*** 2020-07-05 %A\n**** a\n***** b"))
       (org-test-with-temp-text-in-file "* b\n"
 	(let ((org-archive-location "::datetree/* a"))
 	  (org-archive-subtree)
@@ -88,7 +88,7 @@
     ;; ... and with `org-odd-levels-only' non-nil.
     (should
      (string-match-p
-      (regexp-quote "***** 2020-07-05 Sunday\n******* a\n********* b")
+      (regexp-quote (format-time-string "***** 2020-07-05 %A\n******* a\n********* b"))
       (org-test-with-temp-text-in-file "* b\n"
 	(let ((org-archive-location "::datetree/* a")
 	      (org-odd-levels-only t))
-- 
2.20.1


             reply	other threads:[~2021-01-13 22:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 22:09 Christian Garbs via General discussions about Org-mode. [this message]
2021-01-14  5:22 ` [PATCH] testing/lisp/test-org-archive.el: Fix test Kyle Meyer

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=20210113220939.sbkhyefniyvsypah@cgarbs.de \
    --to=emacs-orgmode@gnu.org \
    --cc=mitch@cgarbs.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.
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).