git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] pretty tests: give --date/format tests a better description

From
ZheNing Hu <adlternative@gmail.com>
Date
Apr 25, 2021, 09:30 UTC
Message-ID
<CAOLTT8TPn6wF44ARPzq9p7Cnik2rz8DtA-oK1Zk33t49EquTJQ@mail.gmail.com>
In-Reply-To
<patch-2.2-6a17343b23b-20210425T090506Z-avarab@gmail.com>
Hi, Ævar Arnfjörð Bjarmason,
Ævar Arnfjörð Bjarmason <avarab@gmail.com> 于2021年4月25日周日 下午5:11写道:
Show 42 quoted lines
>
> Change the description for the --date/format equivalency tests added
> in 466fb6742d7 (pretty: provide a strict ISO 8601 date format,
> 2014-08-29) and 0df621172d8 (pretty: provide short date format,
> 2019-11-19) to be more meaningful.
>
> This allows us to reword the comment added in the former commit to
> refer to both tests, and any other future test, such as the in-flight
> --date=human format being proposed in [1].
>
> 1. http://lore.kernel.org/git/pull.939.v2.git.1619275340051.gitgitgadget@gmail.com
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
>  t/t4205-log-pretty-formats.sh | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh
> index 0462115ac5c..bcb558ef4d7 100755
> --- a/t/t4205-log-pretty-formats.sh
> +++ b/t/t4205-log-pretty-formats.sh
> @@ -525,14 +525,14 @@ test_expect_success 'strbuf_utf8_replace() not producing NUL' '
>         ! grep Q actual
>  '
>
> -# ISO strict date format
> -test_expect_success 'ISO and ISO-strict date formats display the same values' '
> +# --date=[XXX] and corresponding %a[X] %c[X] format equivalency
> +test_expect_success '--date=iso-strict %ad%cd is the same as %aI%cI' '
>         git log --format=%ad%n%cd --date=iso-strict >expected &&
>         git log --format=%aI%n%cI >actual &&
>         test_cmp expected actual
>  '
>
> -test_expect_success 'short date' '
> +test_expect_success '--date=short %ad%cd is the same as %as%cs' '
>         git log --format=%ad%n%cd --date=short >expected &&
>         git log --format=%as%n%cs >actual &&
>         test_cmp expected actual
> --
> 2.31.1.734.g8d26f61af32
>

Notice that you modified the title of the test `short date`---> `--date=short %ad%cd is the same as %as%cs`, then the `human date` patch I am working should also do the similar things as you do here?

-- ZheNing Hu

Previous: Ævar Arnfjörð BjarmasonNext: ZheNing Hu via GitGitGadget
Message 13 of 15 in “[GSOC] pretty: provide human date format”
  1. [GSOC] pretty: provide human date formatZheNing Hu via GitGitGadget, Apr 23, 2021
  2. Taylor BlauApr 23, 2021
  3. ZheNing HuApr 24, 2021
  4. Philip OakleyApr 23, 2021
  5. ZheNing HuApr 24, 2021
  6. [GSOC] pretty: provide human date formatZheNing Hu via GitGitGadget, Apr 24, 2021
  7. Philip OakleyApr 24, 2021
  8. 0/2 pretty tests: --date/format test improvementsÆvar Arnfjörð Bjarmason, Apr 25, 2021
  9. 1/2 pretty tests: simplify %aI/%cI date format testÆvar Arnfjörð Bjarmason, Apr 25, 2021
  10. Beat BolliApr 26, 2021
  11. Junio C HamanoApr 27, 2021
  12. 2/2 pretty tests: give --date/format tests a better descriptionÆvar Arnfjörð Bjarmason, Apr 25, 2021
  13. ZheNing HuApr 25, 2021
  14. [GSOC] pretty: provide human date formatZheNing Hu via GitGitGadget, Apr 25, 2021
  15. [GSOC] pretty: provide human date formatZheNing Hu via GitGitGadget, May 3, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.