From unknown Tue Jun 17 22:13:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#45819: 28.0.50; time-stamp-tests failures Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: stepheng+emacs@gildea.com, bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jan 2021 16:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45819 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 45819@debbugs.gnu.org Cc: stephen gildea X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: stephen gildea Received: via spool by submit@debbugs.gnu.org id=B.161047053327043 (code B ref -1); Tue, 12 Jan 2021 16:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Jan 2021 16:55:33 +0000 Received: from localhost ([127.0.0.1]:32951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzMxB-000726-5R for submit@debbugs.gnu.org; Tue, 12 Jan 2021 11:55:33 -0500 Received: from lists.gnu.org ([209.51.188.17]:48958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzMx7-00071x-Ul for submit@debbugs.gnu.org; Tue, 12 Jan 2021 11:55:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzMx3-0007nC-65 for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2021 11:55:28 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:53423) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzMwu-0005u3-Bg for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2021 11:55:21 -0500 Received: by mail-wm1-x331.google.com with SMTP id k10so2508731wmi.3 for ; Tue, 12 Jan 2021 08:55:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:user-agent:mime-version; bh=AQy/bfLFYEi6lK/ZCHpWnKBnM3x91eVh5FxXUDN5rek=; b=Sz3+lbdzrnPuvpgxaHTCg4ReHnzWsFo1Zx26bA4MA5edIsZqoUr0ijLL2G9EqNq4LS jkH3lFhl1VwWOmSWeZpI8pZFb067V5fHFbeb0ZGQVNpGekWOiYUfeKUPed3dJFk3ILv1 gq2IHqRN3WNUqD/6jHLZV8ABsx1FC6TeO28I2EEQi8CkfbQ33Cj9FIvVlTLGpZPcmRzU 8zrpzLWddmZkx6snczlm1hgS6We52sPUDbYLalGToyQQTEg/rK94OU8FNb7nRClR7f6H iyyxGExXAx+J86UZh8c8npw5Zf08ZcmCGiWph3XBV9HwKLLKDTg6/kbQk35fAuFFL72+ Ueqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=AQy/bfLFYEi6lK/ZCHpWnKBnM3x91eVh5FxXUDN5rek=; b=OJkx3g/b6KAOdxC8MAY5tS6ToF4O1RFXHVlAn8P1cCL+MEXYcRjsTO9D/O5ZoyWiMP XYmnyrbJX24QRSiyUPFvk55PWzhhvVUhKkdZ49dfhZtzbHGybQgWzYzaCOnhaKZEC3C4 G80XuuaB6KicOkmXT0HomVoi80IORhnJmtM1GsaKZOdp8qEBYB3VHn+yQ8/U79YSRsKW 4jTY4dYTh3UQE+22trIPO4b+J2AmjtWUGR7EZLRM87MESTvPyDdZ4NBu3Xhi+fFhw9RF szjPTv9ITUyHQl5jy8wm07WQLGJboDkwZ9u9o4/kBsND6HWgK7AOOvdz+DY+IKGp5axQ rk7Q== X-Gm-Message-State: AOAM530FAOW8D66VLgW6fhshmZZsOJ6gxz357steNaYBOE5csVOKwgtE oRzzPjnNRsutsRaBxeFWqpij2hICki1xCX+S X-Google-Smtp-Source: ABdhPJyFxjqq8xETujszze/B8hg9kxR6SvBl+MvkL3gRlaE3WbYcu1U7Sdefb6FZPiSzcUfWvHaWTQ== X-Received: by 2002:a7b:c19a:: with SMTP id y26mr219102wmi.20.1610470512263; Tue, 12 Jan 2021 08:55:12 -0800 (PST) Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1]) by smtp.gmail.com with ESMTPSA id v11sm5719964wrt.25.2021.01.12.08.55.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 08:55:11 -0800 (PST) From: "Basil L. Contovounesios" Date: Tue, 12 Jan 2021 16:55:10 +0000 Message-ID: <87im82nlht.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: none client-ip=2a00:1450:4864:20::331; envelope-from=contovob@tcd.ie; helo=mail-wm1-x331.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain X-Debbugs-Cc: Stephen Gildea I've been seeing the attached failures in time-stamp-format-am-pm, time-stamp-format-ignored-modifiers, and time-stamp-format-string-width for a while now. My guess is that all three are failing because AM/PM format is not supported in my locale, and so '%p' returns an empty string, as per (info "(libc) Formatting Calendar Time"). Should the tests be changed to just also handle an empty/blank string, or is a more complicated fix required? Thanks, -- Basil In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2021-01-12 built on tia Repository revision: ca024b0575c4ea754c4c6e6dbf21ed610e0d1fb8 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12010000 System Description: Debian GNU/Linux bullseye/sid Configured using: 'configure 'CC=ccache gcc' 'CFLAGS=-O2 -march=native' --config-cache --prefix=/home/blc/.local --enable-checking=structs --with-x-toolkit=lucid --with-file-notification=yes --with-x' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XAW3D XDBE XIM XPM LUCID ZLIB Important settings: value of $LANG: en_IE.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml easymenu mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo x-toolkit x multi-tty make-network-process emacs) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename=time-stamp-tests.log Content-Transfer-Encoding: quoted-printable Running 27 tests (2021-01-12 16:30:45+0000, selector =E2=80=98(not (or (tag= :expensive-test) (tag :unstable)))=E2=80=99) passed 1/27 time-stamp-custom-count (0.000162 sec) passed 2/27 time-stamp-custom-end (0.000067 sec) passed 3/27 time-stamp-custom-format-tabs-expand (0.000161 sec) passed 4/27 time-stamp-custom-inserts-lines (0.000088 sec) passed 5/27 time-stamp-custom-pattern (0.000928 sec) passed 6/27 time-stamp-custom-time-zone (0.000124 sec) Test time-stamp-format-am-pm backtrace: signal(ert-test-failed (((should (equal (time-stamp-string "%#p" ref ert-fail(((should (equal (time-stamp-string "%#p" ref-time1) "pm"))=20 #f(compiled-function () #)() ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name time-stamp-format-am-pm :documentatio ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable))) ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) ( command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/time-stamp-tests" "- command-line() normal-top-level() Test time-stamp-format-am-pm condition: (ert-test-failed ((should (equal (time-stamp-string "%#p" ref-time1) "pm")) :form (equal "" "pm") :value nil :explanation (arrays-of-different-length 0 2 "" "pm" first-mismatch-at 0))) FAILED 7/27 time-stamp-format-am-pm (0.000081 sec) passed 8/27 time-stamp-format-day-number-in-week (0.000068 sec) passed 9/27 time-stamp-format-day-of-month (0.000077 sec) passed 10/27 time-stamp-format-day-of-week (0.000069 sec) passed 11/27 time-stamp-format-hours-12 (0.000093 sec) passed 12/27 time-stamp-format-hours-24 (0.000092 sec) Test time-stamp-format-ignored-modifiers backtrace: signal(ert-test-failed (((should (equal (time-stamp-string "%.,@-+_=20 ert-fail(((should (equal (time-stamp-string "%.,@-+_ ^(stuff)P" ref- #f(compiled-function () #)() ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name time-stamp-format-ignored-modifiers : ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable))) ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) ( command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/time-stamp-tests" "- command-line() normal-top-level() Test time-stamp-format-ignored-modifiers condition: (ert-test-failed ((should (equal (time-stamp-string "%.,@-+_ ^(stuff)P" ref-time3) "AM")) :form (equal " " "AM") :value nil :explanation (array-elt 0 (different-atoms (32 "#x20" "? ") (65 "#x41" "?A"))))) FAILED 13/27 time-stamp-format-ignored-modifiers (0.000074 sec) passed 14/27 time-stamp-format-minute (0.000109 sec) passed 15/27 time-stamp-format-month-name (0.000061 sec) passed 16/27 time-stamp-format-month-number (0.000075 sec) passed 17/27 time-stamp-format-non-conversions (0.000035 sec) passed 18/27 time-stamp-format-non-date-conversions (0.000074 sec) passed 19/27 time-stamp-format-second (0.000074 sec) Test time-stamp-format-string-width backtrace: signal(ert-test-failed (((should (equal (time-stamp-string "%1P" ref ert-fail(((should (equal (time-stamp-string "%1P" ref-time3) "A")) : #f(compiled-function () #)() ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name time-stamp-format-string-width :docum ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable))) ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) ( command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/time-stamp-tests" "- command-line() normal-top-level() Test time-stamp-format-string-width condition: (ert-test-failed ((should (equal (time-stamp-string "%1P" ref-time3) "A")) :form (equal " " "A") :value nil :explanation (array-elt 0 (different-atoms (32 "#x20" "? ") (65 "#x41" "?A"))))) FAILED 20/27 time-stamp-format-string-width (0.000074 sec) passed 21/27 time-stamp-format-time-zone-name (0.000095 sec) passed 22/27 time-stamp-format-time-zone-offset (0.000125 sec) passed 23/27 time-stamp-format-year-2digit (0.000113 sec) passed 24/27 time-stamp-format-year-4digit (0.000040 sec) passed 25/27 time-stamp-helper-safe-locals (0.000051 sec) passed 26/27 time-stamp-helper-string-defaults (0.000069 sec) passed 27/27 time-stamp-helper-zone-type-p (0.000041 sec) Ran 27 tests, 24 results as expected, 3 unexpected (2021-01-12 16:30:45+000= 0, 0.232066 sec) 3 unexpected results: FAILED time-stamp-format-am-pm FAILED time-stamp-format-ignored-modifiers FAILED time-stamp-format-string-width --=-=-=-- From unknown Tue Jun 17 22:13:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#45819: 28.0.50; time-stamp-tests failures Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jan 2021 17:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45819 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 45819@debbugs.gnu.org Cc: stephen gildea Received: via spool by 45819-submit@debbugs.gnu.org id=B45819.161047149928815 (code B ref 45819); Tue, 12 Jan 2021 17:12:02 +0000 Received: (at 45819) by debbugs.gnu.org; 12 Jan 2021 17:11:39 +0000 Received: from localhost ([127.0.0.1]:32978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzNCk-0007Ug-8W for submit@debbugs.gnu.org; Tue, 12 Jan 2021 12:11:39 -0500 Received: from mail-wm1-f48.google.com ([209.85.128.48]:34431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzNCh-0007UP-Jb for 45819@debbugs.gnu.org; Tue, 12 Jan 2021 12:11:36 -0500 Received: by mail-wm1-f48.google.com with SMTP id g25so2115921wmh.1 for <45819@debbugs.gnu.org>; Tue, 12 Jan 2021 09:11:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Vid4QNZCncmKW0JAx4rYaCFmM+7tYT33M40yuVCY324=; b=WxnBtwPHs28/v0nprCnB2zkfxJh/zoUK4mJKnVS1ABitcZ3S0tySKRLoWwY8UvEcdr SQTdkMT2AKZS//MePTep5L4vP03YclTDrL9DM4/FBWJuccGz4MQ+f93l18edXXSuDqwm ITjhtExJUyJglsm+APpjKu06q3w43Z9mFV+Z92AtxC8I6MVDP3RqdW/AnUoGc6V73gsU mUnAZKDY4L2C0hWIEb/FUIEFWVXHU1V9V/jI6puqRCEPHYtLg5kHQ45fDvrWrovEJ9le 3mAxeJi3+MGGoiQTYgZQT7a59+V/0Xo0eb9bwnWhyxKN4OSmVjBQBoKSFUimgSt777/l Zplw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Vid4QNZCncmKW0JAx4rYaCFmM+7tYT33M40yuVCY324=; b=UWGNx5RaZ6iIPqx1IWRPJ134TDchIDvs7VMdQVpfUJhtNsVEMLpeNzYoZuTm2scaS2 K47VVXnlNi46T2Wi0a5WvChcIkgQQa3vmlz0IdlVq1FyhBQhInHJqFXH5rU8rdl9QG66 HonLdq/Sm4J321AOPVBkbypU4rSuhnqnwqu6EVvrZEVEiHwTOaG8Uva7U4mz4YB+s8KA QViJhFF6dvrPKmhtz9o+2rGSW6KvGBX015xSeaoaZVjUtt98xM8x8kUAe710XrjsPFaI 6Oo90o8H64D5wV0qDp7Fe4C3yr0pzuRANYUsI4mIqhs9KWSAMoc5+P+bn1uezJ2vFdwd pe8w== X-Gm-Message-State: AOAM531LwryMChM9LHfsGO73PVwPa9UY9FkxhiJHoKu0IPeV992dHzKD pix6d5o69Z1j8cjx0hp8Xa95/e0JRsfxg5gI X-Google-Smtp-Source: ABdhPJwIG5tpUAVQ8k54YC71Azp4r53LQIeXodkPk2V1uB74/NUii6BnXVvuJvIxiOyTY97UFcg90A== X-Received: by 2002:a1c:3c04:: with SMTP id j4mr217295wma.177.1610471489250; Tue, 12 Jan 2021 09:11:29 -0800 (PST) Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1]) by smtp.gmail.com with ESMTPSA id h14sm5778132wrx.37.2021.01.12.09.11.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 09:11:28 -0800 (PST) From: "Basil L. Contovounesios" References: <87im82nlht.fsf@tcd.ie> Date: Tue, 12 Jan 2021 17:11:26 +0000 In-Reply-To: <87im82nlht.fsf@tcd.ie> (Basil L. Contovounesios's message of "Tue, 12 Jan 2021 16:55:10 +0000") Message-ID: <878s8ynkqp.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain "Basil L. Contovounesios" writes: > I've been seeing the attached failures in time-stamp-format-am-pm, > time-stamp-format-ignored-modifiers, and time-stamp-format-string-width > for a while now. > > My guess is that all three are failing because AM/PM format is not > supported in my locale, and so '%p' returns an empty string, as per > (info "(libc) Formatting Calendar Time"). > > Should the tests be changed to just also handle an empty/blank string, Perhaps something like the attached? Thanks, -- Basil --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-time-stamp-tests-for-non-AM-PM-locales.patch >From 39ef99ab39f7421cb515b41a9e8c5999ded1d5c8 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Tue, 12 Jan 2021 17:08:27 +0000 Subject: [PATCH] Fix time-stamp-tests for non-AM/PM locales * test/lisp/time-stamp-tests.el (with-time-stamp-test-env): Add Edebug spec. (time-stamp-format-am-pm, time-stamp-format-ignored-modifiers) (time-stamp-format-string-width): Handle locales which don't support AM/PM formats and return an empty string instead (bug#45819). --- test/lisp/time-stamp-tests.el | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/test/lisp/time-stamp-tests.el b/test/lisp/time-stamp-tests.el index 81488c3df1..c0c5e6dae5 100644 --- a/test/lisp/time-stamp-tests.el +++ b/test/lisp/time-stamp-tests.el @@ -26,7 +26,7 @@ (defmacro with-time-stamp-test-env (&rest body) "Evaluate BODY with some standard time-stamp test variables bound." - (declare (indent defun)) + (declare (debug (body)) (indent defun)) `(let ((user-login-name "test-logname") (user-full-name "100%d Tester") ;verify "%" passed unchanged (buffer-file-name "/emacs/test/time-stamped-file") @@ -481,16 +481,17 @@ time-stamp-format-year-4digit (should (equal (time-stamp-string "%Y" ref-time1) "2006")))) (ert-deftest time-stamp-format-am-pm () - "Test time-stamp formats for AM and PM strings." + "Test time-stamp formats for AM and PM strings. +Note that `%P' returns an empty string in some locales." (with-time-stamp-test-env ;; implemented and documented since 1997 - (should (equal (time-stamp-string "%#p" ref-time1) "pm")) - (should (equal (time-stamp-string "%#p" ref-time3) "am")) - (should (equal (time-stamp-string "%P" ref-time1) "PM")) - (should (equal (time-stamp-string "%P" ref-time3) "AM")) + (should (member (time-stamp-string "%#p" ref-time1) '("" "pm"))) + (should (member (time-stamp-string "%#p" ref-time3) '("" "am"))) + (should (member (time-stamp-string "%P" ref-time1) '("" "PM"))) + (should (member (time-stamp-string "%P" ref-time3) '("" "AM"))) ;; warned 1997-2019, changed in 2019 - (should (equal (time-stamp-string "%p" ref-time1) "PM")) - (should (equal (time-stamp-string "%p" ref-time3) "AM")))) + (should (member (time-stamp-string "%p" ref-time1) '("" "PM"))) + (should (member (time-stamp-string "%p" ref-time3) '("" "AM"))))) (ert-deftest time-stamp-format-day-number-in-week () "Test time-stamp formats for day number in week." @@ -565,10 +566,12 @@ time-stamp-format-non-date-conversions (should (equal (time-stamp-string "%q" ref-time1) "sysname-no-dots"))))) (ert-deftest time-stamp-format-ignored-modifiers () - "Test additional args allowed (but ignored) to allow for future expansion." + "Test additional args allowed (but ignored) to allow for future expansion. +Note that `%P' returns an empty string in some locales." (with-time-stamp-test-env ;; allowed modifiers - (should (equal (time-stamp-string "%.,@-+_ ^(stuff)P" ref-time3) "AM")) + (should (member (time-stamp-string "%.,@-+_ ^(stuff)P" ref-time3) + '(" " "AM"))) ;; not all punctuation is allowed (should-not (equal (time-stamp-string "%&P" ref-time3) "AM")))) @@ -578,13 +581,14 @@ time-stamp-format-non-conversions (should (equal (time-stamp-string "No percent" ref-time1) "No percent")))) (ert-deftest time-stamp-format-string-width () - "Test time-stamp string width modifiers." + "Test time-stamp string width modifiers. +Note that `%P' returns an empty string in some locales." (with-time-stamp-test-env ;; strings truncate on the right or are blank-padded on the left (should (equal (time-stamp-string "%0P" ref-time3) "")) - (should (equal (time-stamp-string "%1P" ref-time3) "A")) - (should (equal (time-stamp-string "%2P" ref-time3) "AM")) - (should (equal (time-stamp-string "%3P" ref-time3) " AM")) + (should (member (time-stamp-string "%1P" ref-time3) '(" " "A"))) + (should (member (time-stamp-string "%2P" ref-time3) '(" " "AM"))) + (should (member (time-stamp-string "%3P" ref-time3) '(" " " AM"))) (should (equal (time-stamp-string "%0%" ref-time3) "")) (should (equal (time-stamp-string "%1%" ref-time3) "%")) (should (equal (time-stamp-string "%2%" ref-time3) " %")) -- 2.29.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 18 17:53:01 2021 Received: (at control) by debbugs.gnu.org; 18 Jan 2021 22:53:01 +0000 Received: from localhost ([127.0.0.1]:48692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1dOP-00024T-1r for submit@debbugs.gnu.org; Mon, 18 Jan 2021 17:53:01 -0500 Received: from mail-wm1-f54.google.com ([209.85.128.54]:40154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1dOM-000246-EN for control@debbugs.gnu.org; Mon, 18 Jan 2021 17:52:59 -0500 Received: by mail-wm1-f54.google.com with SMTP id r4so15047604wmh.5 for ; Mon, 18 Jan 2021 14:52:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=BqD5LFFtkItLI7X/UFIVL5rvIB3w2Mp70IUSvlkg4ug=; b=DX+d9FVHg33NCNPZp7/rQuurrW7DL1LhOVZOaT5gTvVp3Uy5C+ByEapMHkATGrkRT5 EdYEPGTcFXAlUOv/dTqWTC1VwVI94Y8W4ECaLxX2OM/kjJP42dncBXdCU4xSS7v8col8 1z94nn5V0dY8x3jWpFlSWHyUFbXKM1ob71AIy/0llnezSibpjfFX9obRcOF9KdMGsQ/L mMz67aGno48WgBhkGxLWicdx59pD+aI5a62LAp7FPqAPBH3YJ4Nz20Ki8WiY7zrApp/g oIOChHR2jZGx8hB0xUaA2QDvRS6SZw7YFlS/G52CqTX9y5QkNFGRmJeEoNm+huz3RF14 SPWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=BqD5LFFtkItLI7X/UFIVL5rvIB3w2Mp70IUSvlkg4ug=; b=ZZxMBgBcwCWmmg97Glm9DeEhkJgYfkAX6C6oVM5JXCE5sGsl6D1oR+zBIsjfJ8tQ5c 6QiixdHUXPgLK2ww0AObvENJ5fL3q/1eWbmU5sN/OkhVShO2WGZE+JPQNc8x9fnuTf/Y 08CIxc6/qHd6GtNaf90zkqylOP3HjoaIXbW6R62r7DeAecmT4bCy3PRba+lhyI1QoipE ffQrZeZ6ygM7mKDeQP8qyO1KN4NSVxHaBS4bapolRZgKUEd/F5xTqo/4U7U3TC/SUGZZ cphQSRxxmI7l5OakxPVTUKP/0J2bPkHUKR0vd3Q/LhXcBzsDOPGB4C3rK8yTDIEor2uv cg0Q== X-Gm-Message-State: AOAM532mWfQo+5ens59tIzSUhvZJtqsXm1BjHJFNUeMeCBBZ95fpgf0R wRKkIcWh125rIenoChB78kn48WX2MbYFDyr4 X-Google-Smtp-Source: ABdhPJzrpZxhHYPHYUDsyIaLUR2JRL/rYXvZHidWcpJ3M6/mrKmPP8/k6SQgjpPEVay5tZkdOcMNtQ== X-Received: by 2002:a05:600c:230a:: with SMTP id 10mr1345716wmo.49.1611010372437; Mon, 18 Jan 2021 14:52:52 -0800 (PST) Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1]) by smtp.gmail.com with ESMTPSA id z3sm34585230wrn.59.2021.01.18.14.52.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 14:52:51 -0800 (PST) From: "Basil L. Contovounesios" To: 45819-done@debbugs.gnu.org Subject: Re: bug#45819: 28.0.50; time-stamp-tests failures References: <87im82nlht.fsf@tcd.ie> Date: Mon, 18 Jan 2021 22:52:49 +0000 In-Reply-To: <87im82nlht.fsf@tcd.ie> (Basil L. Contovounesios's message of "Tue, 12 Jan 2021 16:55:10 +0000") Message-ID: <87czy1amda.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: stephen gildea X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 45819 fixed close 45819 28.1 quit "Basil L. Contovounesios" writes: > X-Debbugs-Cc: Stephen Gildea > > I've been seeing the attached failures in time-stamp-format-am-pm, > time-stamp-format-ignored-modifiers, and time-stamp-format-string-width > for a while now. Now fixed: time-stamp-tests now pass in more locales 35119b2bc0 2021-01-18 13:47:15 -0800 https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=35119b2bc0fd602a19fa0b07d305592d139be6a8 -- Basil