emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ruijie Yu via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: Axel Kielhorn <org-mode@axelkielhorn.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Test failure due to LANG
Date: Sat, 22 Apr 2023 17:51:30 +0800	[thread overview]
Message-ID: <sdvzg70utif.fsf@netyu.xyz> (raw)
In-Reply-To: <D140FA73-9995-4467-963E-00D5964485C0@axelkielhorn.de>

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


Axel Kielhorn <org-mode@axelkielhorn.de> writes:

> Hello!
>
> I’m building org with LANG=de.
> As a result I get two failed tests:

Reproducible using "LANG=zh_CN.UTF-8".  In fact, I got more failed tests
in my testing.  I think the OP's two test failures are due to hardcoded
English expected result, whereas the additional test failures on my
testing are probably due to the fact that each Chinese character is as
wide as two latin letters, which catches some testing code offguard.

Here are the test names that failed unexpectedly for me.  All the
"should"'s and "should-not"'s are in the attachment below.

--8<---------------cut here---------------start------------->8---
8 unexpected results:
   FAILED  test-org-clock/clock-drawer-dwim
   FAILED  test-org-clock/clocktable/lang
   FAILED  test-org-clok/org-clock-timestamps-change
   FAILED  test-org-colview/columns-width
   FAILED  test-org/add-planning-info
   FAILED  test-org/clone-with-time-shift
   FAILED  test-org/deadline
   FAILED  test-org/schedule
--8<---------------cut here---------------end--------------->8---


[-- Attachment #2: lang.txt --]
[-- Type: text/plain, Size: 7282 bytes --]

8 unexpected results:
   FAILED  test-org-clock/clock-drawer-dwim  ((should (equal "* Foo\n:LOGBOOK:\nCLOCK: [2022-11-03 Thu 06:00]--[2022-11-03 Thu 06:01] =>  0:01\n:END:\n" (org-test-with-temp-text "* Foo\n:LOGBOOK:\n<point>CLOCK: [2022-11-03 ??? 06:00]--[2022-11-03 ??? 06:01] =>  0:01\n:END:\n" (org-ctrl-c-ctrl-c) (buffer-string)))) :form (equal "* Foo\n:LOGBOOK:\nCLOCK: [2022-11-03 Thu 06:00]--[2022-11-03 Thu 06:01] =>  0:01\n:END:\n" #("* Foo\n:LOGBOOK:\nCLOCK: [2022-11-03 四 06:00]--[2022-11-03 四 06:01] =>  0:01\n:END:\n" 0 2 (face org-level-1) 2 5 (face org-level-1) 6 15 (font-lock-fontified t face org-drawer) 16 22 (face org-special-keyword) 43 65 (face org-date keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight) 75 80 (font-lock-fontified t face org-drawer))) :value nil :explanation (arrays-of-different-length 85 81 "* Foo\n:LOGBOOK:\nCLOCK: [2022-11-03 Thu 06:00]--[2022-11-03 Thu 06:01] =>  0:01\n:END:\n" #("* Foo\n:LOGBOOK:\nCLOCK: [2022-11-03 四 06:00]--[2022-11-03 四 06:01] =>  0:01\n:END:\n" 0 2 (face org-level-1) 2 5 (face org-level-1) 6 15 (font-lock-fontified t face org-drawer) 16 22 (face org-special-keyword) 43 65 (face org-date keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight) 75 80 (font-lock-fontified t face org-drawer)) first-mismatch-at 35))
   FAILED  test-org-clock/clocktable/lang  ((should (equal "| En-tête        | Durée   |\n|----------------+---------|\n| *Durée totale* | *26:00* |\n|----------------+---------|\n| Foo            | 26:00   |" (org-test-with-temp-text "* Foo\n  CLOCK: [2016-12-27 Wed 13:09]--[2016-12-28 Wed 15:09] => 26:00" (test-org-clock-clocktable-contents ":maxlevel 1 :lang fr")))) :form (equal "| En-tête        | Durée   |\n|----------------+---------|\n| *Durée totale* | *26:00* |\n|----------------+---------|\n| Foo            | 26:00   |" "| En-tête        | Durée  |\n|-----------------+---------|\n| *Durée totale* | *26:00* |\n|-----------------+---------|\n| Foo             | 26:00   |") :value nil :explanation (arrays-of-different-length 144 146 "| En-tête        | Durée   |\n|----------------+---------|\n| *Durée totale* | *26:00* |\n|----------------+---------|\n| Foo            | 26:00   |" "| En-tête        | Durée  |\n|-----------------+---------|\n| *Durée totale* | *26:00* |\n|-----------------+---------|\n| Foo             | 26:00   |" first-mismatch-at 26))
   FAILED  test-org-clok/org-clock-timestamps-change  ((should (equal "CLOCK: [2023-02-19 Sun 21:30]--[2023-02-19 Sun 23:35] =>  2:05" (org-test-with-temp-text "CLOCK: [2023-02-19 Sun 2<point>2:30]--[2023-02-20 Mon 00:35] =>  2:05" (org-clock-timestamps-change 'down 1) (buffer-string)))) :form (equal "CLOCK: [2023-02-19 Sun 21:30]--[2023-02-19 Sun 23:35] =>  2:05" #("CLOCK: [2023-02-19 日 21:30]--[2023-02-19 日 23:35] =>  2:05" 0 6 (face org-special-keyword) 27 49 (face org-date keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight))) :value nil :explanation (arrays-of-different-length 62 58 "CLOCK: [2023-02-19 Sun 21:30]--[2023-02-19 Sun 23:35] =>  2:05" #("CLOCK: [2023-02-19 日 21:30]--[2023-02-19 日 23:35] =>  2:05" 0 6 (face org-special-keyword) 27 49 (face org-date keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight)) first-mismatch-at 19))
   FAILED  test-org-colview/columns-width  ((should (equal "1234… |" (org-test-with-temp-text "* H\n:PROPERTIES:\n:P: 123456\n:END:" (let (... ...) (org-columns)) (org-trim (get-char-property ... ...))))) :form (equal "1234… |" "1234  |") :value nil :explanation (array-elt 4 (different-atoms (8230 "#x2026" "?…") (32 "#x20" "? "))))
   FAILED  test-org/add-planning-info  ((should (equal "* H\n  DEADLINE: <2015-06-25>\nParagraph" (org-test-with-temp-text "* H\nParagraph<point>" (let (...) (org-add-planning-info ... "<2015-06-25 Thu>")) (replace-regexp-in-string "\\( [.A-Za-z]+\\)>" "" (buffer-string) nil nil 1)))) :form (equal "* H\n  DEADLINE: <2015-06-25>\nParagraph" #("* H\n  DEADLINE: <2015-06-25 四>\nParagraph" 0 2 (face org-level-1) 2 30 (face org-level-1))) :value nil :explanation (arrays-of-different-length 38 40 "* H\n  DEADLINE: <2015-06-25>\nParagraph" #("* H\n  DEADLINE: <2015-06-25 四>\nParagraph" 0 2 (face org-level-1) 2 30 (face org-level-1)) first-mismatch-at 27))
   FAILED  test-org/clone-with-time-shift  ((should (equal "* H1\n<2015-06-21>\n* H1\n<2015-06-23>\n" (org-test-with-temp-text "* H1\n<2015-06-21 Sun>" (org-clone-subtree-with-time-shift 1 "+2d") (replace-regexp-in-string "\\( [.A-Za-z]+\\)\\( \\+[0-9][hdmwy]\\)?>" "" (buffer-string) nil nil 1)))) :form (equal "* H1\n<2015-06-21>\n* H1\n<2015-06-23>\n" #("* H1\n<2015-06-21>\n* H1\n<2015-06-23 二>\n" 0 2 (face org-level-1) 2 4 (face org-level-1) 5 16 (face org-date keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight) 16 17 (face org-date rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight) 18 20 (face org-level-1) 20 22 (face org-level-1))) :value nil :explanation (arrays-of-different-length 36 38 "* H1\n<2015-06-21>\n* H1\n<2015-06-23>\n" #("* H1\n<2015-06-21>\n* H1\n<2015-06-23 二>\n" 0 2 (face org-level-1) 2 4 (face org-level-1) 5 16 (face org-date keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight) 16 17 (face org-date rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) mouse-face highlight) 18 20 (face org-level-1) 20 22 (face org-level-1)) first-mismatch-at 34))
   FAILED  test-org/deadline  ((should (equal "* H\nDEADLINE: <2012-03-29>" (org-test-with-temp-text "* H" (let (... ...) (org-deadline nil "<2012-03-29 Tue>")) (replace-regexp-in-string "\\( [.A-Za-z]+\\)>" "" (buffer-string) nil nil 1)))) :form (equal "* H\nDEADLINE: <2012-03-29>" #("* H\nDEADLINE: <2012-03-29 四>" 0 2 (face org-level-1) 2 28 (face org-level-1))) :value nil :explanation (arrays-of-different-length 26 28 "* H\nDEADLINE: <2012-03-29>" #("* H\nDEADLINE: <2012-03-29 四>" 0 2 (face org-level-1) 2 28 (face org-level-1)) first-mismatch-at 25))
   FAILED  test-org/schedule  ((should (equal "* H\nSCHEDULED: <2012-03-29>" (org-test-with-temp-text "* H" (let (... ...) (org-schedule nil "<2012-03-29 Tue>")) (replace-regexp-in-string "\\( [.A-Za-z]+\\)>" "" (buffer-string) nil nil 1)))) :form (equal "* H\nSCHEDULED: <2012-03-29>" #("* H\nSCHEDULED: <2012-03-29 四>" 0 2 (face org-level-1) 2 29 (face org-level-1))) :value nil :explanation (arrays-of-different-length 27 29 "* H\nSCHEDULED: <2012-03-29>" #("* H\nSCHEDULED: <2012-03-29 四>" 0 2 (face org-level-1) 2 29 (face org-level-1)) first-mismatch-at 26))

[-- Attachment #3: Type: text/plain, Size: 2936 bytes --]


>    FAILED  test-org-clock/clock-drawer-dwim  ((should (equal "*
> Foo\n:LOGBOOK:\nCLOCK: [2022-11-03 Thu 06:00]--[2022-11-03 Thu 06:01] =>
> 0:01\n:END:\n" (org-test-with-temp-text "* Foo\n:LOGBOOK:\n<point>CLOCK:
> [2022-11-03 ??? 06:00]--[2022-11-03 ??? 06:01] =>  0:01\n:END:\n"
> (org-ctrl-c-ctrl-c) (buffer-string)))) :form (equal "*
> Foo\n:LOGBOOK:\nCLOCK: [2022-11-03 Thu 06:00]--[2022-11-03 Thu 06:01] =>
> 0:01\n:END:\n" #("* Foo\n:LOGBOOK:\nCLOCK: [2022-11-03 Do
> 06:00]--[2022-11-03 Do 06:01] =>  0:01\n:END:\n" 0 2 (face org-level-1) 2 5
> (face org-level-1) 6 15 (face org-drawer font-lock-fontified t) 16 22 (face
> org-special-keyword) 44 67 (mouse-face highlight keymap (keymap (follow-link
> . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 .
> org-open-at-mouse)) face org-date) 77 82 (face org-drawer
> font-lock-fontified t))) :value nil :explanation 
> (arrays-of-different-length 85 83 
>
> "* Foo\n:LOGBOOK:\nCLOCK: [2022-11-03 Thu 06:00]--[2022-11-03 Thu 06:01] =>  0:01\n:END:\n" #(
> "* Foo\n:LOGBOOK:\nCLOCK: [2022-11-03 Do 06:00]--[2022-11-03 Do 06:01] =>  0:01\n:END:\n" 
>
> 0 2 (face org-level-1) 2 5 (face org-level-1) 6 15 (face org-drawer
> font-lock-fontified t) 16 22 (face org-special-keyword) 44 67 (mouse-face
> highlight keymap (keymap (follow-link . mouse-face) (mouse-3
> . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)) face org-date) 77 82
> (face org-drawer font-lock-fontified t)) first-mismatch-at 35))
>
>    FAILED  test-org-clok/org-clock-timestamps-change  ((should (equal
> "CLOCK: [2023-02-19 Sun 21:30]--[2023-02-19 Sun 23:35] =>  2:05"
> (org-test-with-temp-text "CLOCK: [2023-02-19 Sun 2<point>2:30]--[2023-02-20
> Mon 00:35] =>  2:05" (org-clock-timestamps-change 'down 1)
> (buffer-string)))) :form (equal "CLOCK: [2023-02-19 Sun 21:30]--[2023-02-19
> Sun 23:35] =>  2:05" #("CLOCK: [2023-02-19 So 21:30]--[2023-02-19 So 23:35]
> =>  2:05" 0 6 (face org-special-keyword) 28 51 (mouse-face highlight keymap
> (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse)
> (mouse-2 . org-open-at-mouse)) face org-date))) :value nil :explanation
> (arrays-of-different-length 62 60 
>
> "CLOCK: [2023-02-19 Sun 21:30]--[2023-02-19 Sun 23:35] =>  2:05" #(
> "CLOCK: [2023-02-19 So 21:30]--[2023-02-19 So 23:35] =>  2:05" 
>
> 0 6 (face org-special-keyword) 28 51 (mouse-face highlight keymap (keymap
> (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2
> . org-open-at-mouse)) face org-date)) first-mismatch-at 20))
>
> When I build with LANG=C, these tests pass.
>
> I’m using macOS 11.7 on intel, but that shouldn’t affect these two fails.

For me, I have a month-old Emacs master, with an up-to-date orgmode.git.

> Greetings Axel

-- 
Best,


RY

[Please note that this mail might go to spam due to some
misconfiguration in my mail server -- still investigating.]

  reply	other threads:[~2023-04-22 10:01 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-22  7:11 Test failure due to LANG Axel Kielhorn
2023-04-22  9:51 ` Ruijie Yu via General discussions about Org-mode. [this message]
2023-04-22 10:15   ` Ruijie Yu via General discussions about Org-mode.
2023-04-22 12:37     ` Ruijie Yu via General discussions about Org-mode.
2023-04-22 13:01       ` [DRAFT PATCH v2] Decouple LANG= and testing (was: Test failure due to LANG) Ruijie Yu via General discussions about Org-mode.
2023-04-22 13:51         ` Ruijie Yu via General discussions about Org-mode.
2023-04-23 10:54           ` Ihor Radchenko
     [not found]             ` <sdvjzy2rhne.fsf@netyu.xyz>
2023-04-23 11:19               ` Ihor Radchenko
2023-04-23 14:30                 ` Ruijie Yu via General discussions about Org-mode.
2023-04-23 15:03                   ` Ihor Radchenko
2023-04-23 15:15                     ` Ruijie Yu via General discussions about Org-mode.
2023-04-25 10:11                       ` Ihor Radchenko
2023-04-25 15:14                         ` Ruijie Yu via General discussions about Org-mode.
2023-04-22 14:50         ` Axel Kielhorn
2023-04-22 15:03           ` Ruijie Yu via General discussions about Org-mode.
2023-04-23  1:47             ` [DRAFT PATCH v3] " Ruijie Yu via General discussions about Org-mode.
2023-04-23  5:36               ` Axel Kielhorn
2023-04-23  6:46                 ` [DRAFT PATCH v4] " Ruijie Yu via General discussions about Org-mode.
2023-04-23 11:17                   ` Ihor Radchenko
2023-04-23 13:57                     ` Ruijie Yu via General discussions about Org-mode.
2023-04-23 15:07                       ` Ihor Radchenko
2023-04-25  8:02                         ` [DRAFT PATCH v5] " Ruijie Yu via General discussions about Org-mode.
2023-04-25 15:19                           ` [DRAFT PATCH v6] " Ruijie Yu via General discussions about Org-mode.
2023-04-26  9:05                             ` Ihor Radchenko
2023-04-26  8:44                           ` [DRAFT PATCH v5] " Ihor Radchenko
2023-07-17  8:58                             ` Ihor Radchenko
2023-04-22 14:28       ` Test failure due to LANG Axel Kielhorn
2023-04-22 12:35 ` Ihor Radchenko
2023-04-22 13:00   ` Ruijie Yu via General discussions about Org-mode.
2023-04-22 14:21   ` Max Nikulin
2023-04-22 14:35     ` Ihor Radchenko
2023-04-22 14:40     ` Axel Kielhorn
2023-04-22 16:14       ` Max Nikulin
2023-04-22 14:36   ` Axel Kielhorn

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=sdvzg70utif.fsf@netyu.xyz \
    --to=emacs-orgmode@gnu.org \
    --cc=org-mode@axelkielhorn.de \
    --cc=ruijie@netyu.xyz \
    /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).