diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-05-07 12:47:37 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-05-07 12:47:38 +0900 |
commit | e5d99d378bc8207d7fccab678be7e7135f0606d1 (patch) | |
tree | b0235e25195f5886e9c66a75d853ea26a4df4522 /t | |
parent | Merge branch 'ps/config-env-option-with-separate-value' (diff) | |
parent | pretty tests: give --date/format tests a better description (diff) | |
download | tgif-e5d99d378bc8207d7fccab678be7e7135f0606d1.tar.xz |
Merge branch 'ab/pretty-date-format-tests'
Tweak a few tests for "log --format=..." that show timestamps in
various formats.
* ab/pretty-date-format-tests:
pretty tests: give --date/format tests a better description
pretty tests: simplify %aI/%cI date format test
Diffstat (limited to 't')
-rwxr-xr-x | t/t4205-log-pretty-formats.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh index cabdf7d57a..bcb558ef4d 100755 --- a/t/t4205-log-pretty-formats.sh +++ b/t/t4205-log-pretty-formats.sh @@ -525,15 +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' ' - git log --format=%ai%n%ci | - sed -e "s/ /T/; s/ //; s/..\$/:&/" >expected && +# --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 |