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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Ævar Arnfjörð Bjarmason,

Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> 于2021年4月25日周日 下午5:11写道:
>
> 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@xxxxxxxxx
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
> ---
>  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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux