git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"ZheNing Hu" <adlternative@gmail.com>,
	"René Scharfe" <l.s.r@web.de>, "Taylor Blau" <me@ttaylorr.com>,
	"Beat Bolli" <bbolli@ewanet.ch>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 1/2] pretty tests: simplify %aI/%cI date format test
Date: Sun, 25 Apr 2021 11:11:32 +0200	[thread overview]
Message-ID: <patch-1.2-4a90e4a141a-20210425T090506Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-0.2-00000000000-20210425T090506Z-avarab@gmail.com>

Change a needlessly complex test for the %aI/%cI date
formats (iso-strict) added in 466fb6742d7 (pretty: provide a strict
ISO 8601 date format, 2014-08-29) to instead use the same pattern used
to test %as/%cs since 0df621172d8 (pretty: provide short date format,
2019-11-19).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t4205-log-pretty-formats.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh
index cabdf7d57a0..0462115ac5c 100755
--- a/t/t4205-log-pretty-formats.sh
+++ b/t/t4205-log-pretty-formats.sh
@@ -527,8 +527,7 @@ test_expect_success 'strbuf_utf8_replace() not producing NUL' '
 
 # ISO strict date format
 test_expect_success 'ISO and ISO-strict date formats display the same values' '
-	git log --format=%ai%n%ci |
-	sed -e "s/ /T/; s/ //; s/..\$/:&/" >expected &&
+	git log --format=%ad%n%cd --date=iso-strict >expected &&
 	git log --format=%aI%n%cI >actual &&
 	test_cmp expected actual
 '
-- 
2.31.1.734.g8d26f61af32


  reply	other threads:[~2021-04-25  9:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 16:27 [PATCH] [GSOC] pretty: provide human date format ZheNing Hu via GitGitGadget
2021-04-23 20:21 ` Taylor Blau
2021-04-24 13:26   ` ZheNing Hu
2021-04-23 21:10 ` Philip Oakley
2021-04-24 13:33   ` ZheNing Hu
2021-04-24 14:42 ` [PATCH v2] " ZheNing Hu via GitGitGadget
2021-04-24 19:44   ` Philip Oakley
2021-04-25  9:11   ` [PATCH 0/2] pretty tests: --date/format test improvements Ævar Arnfjörð Bjarmason
2021-04-25  9:11     ` Ævar Arnfjörð Bjarmason [this message]
2021-04-26 21:22       ` [PATCH 1/2] pretty tests: simplify %aI/%cI date format test Beat Bolli
2021-04-27  7:08       ` Junio C Hamano
2021-04-25  9:11     ` [PATCH 2/2] pretty tests: give --date/format tests a better description Ævar Arnfjörð Bjarmason
2021-04-25  9:30       ` ZheNing Hu
2021-04-25 10:41   ` [PATCH v3] [GSOC] pretty: provide human date format ZheNing Hu via GitGitGadget
2021-05-03 15:37     ` [PATCH v4] " ZheNing Hu via GitGitGadget

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: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=patch-1.2-4a90e4a141a-20210425T090506Z-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=adlternative@gmail.com \
    --cc=bbolli@ewanet.ch \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=l.s.r@web.de \
    --cc=me@ttaylorr.com \
    /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 inbox:

	https://80x24.org/mirrors/git.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).