[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug: test-org-archive/datetree fails with German locale
From: |
Christian Garbs |
Subject: |
Bug: test-org-archive/datetree fails with German locale |
Date: |
Sat, 9 Jan 2021 21:24:38 +0100 |
User-agent: |
NeoMutt/20180716 |
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").
+v
Test test-org-archive/datetree condition:
(ert-test-failed
((should
(string-match-p
(regexp-quote "*** 2020-07-05 Sunday
**** a")
(org-test-with-temp-text-in-file "* a
" ...)))
:form
(string-match-p "\\*\\*\\* 2020-07-05 Sunday
\\*\\*\\*\\* a"
#("* 2020
** 2020-07 Juli
*** 2020-07-05 Sonntag
**** a
:PROPERTIES:
:ARCHIVE_TIME: 2020-07-05 So 00:00
:ARCHIVE_FILE: /tmp/tmp-orgtest/org-testogmzZy
:ARCHIVE_CATEGORY: org-testogmzZy
:END:
" 53 54
(org-category "org-testogmzZy")
214 215
(org-category "org-testogmzZy")))
:value nil))
FAILED 1/1 test-org-archive/datetree
-v
Running the tests with LANG=C or even just LC_TIME=C makes the test
pass again.
A simple fix for this would be to prepend LANG=C to $(EMACSQ) in
mk/default.mk so all tests run with a defined locale.
This would prevent other locale-related test failures in the future.
But on the other hand this would also hide real locale-related bugs in
the production code, as all tests only run with LANG=C from then on.
A less intrusive fix would be to replace the fixed string "Sunday" in
the test regexp by the localized weekday.
What do you think?
Best regards
Christian
--
....Christian.Garbs....................................https://www.cgarbs.de
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bug: test-org-archive/datetree fails with German locale,
Christian Garbs <=