[PATCH 09/20] abbrev tests: test for "git-log" behavior
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Jun 8, 2018, 22:41 UTC
- Message-ID
- <20180608224136.20220-10-avarab@gmail.com>
- In-Reply-To
- <20180608224136.20220-1-avarab@gmail.com>
The "log" family of commands does its own parsing for --abbrev in revision.c, so having dedicated tests for it makes sense.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- t/t0014-abbrev.sh | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/t/t0014-abbrev.sh b/t/t0014-abbrev.sh index 645bcca1d1..a66051c040 100755 --- a/t/t0014-abbrev.sh +++ b/t/t0014-abbrev.sh @@ -203,4 +203,14 @@ do " done +for i in $(test_seq 4 40) +do + test_expect_success "log core.abbrev=$i and --abbrev=$i" " + git -c core.abbrev=$i log --pretty=format:%h -1 | tr_d_n >log && + test_byte_count = $i log && + git log --abbrev=$i --pretty=format:%h -1 | tr_d_n >log && + test_byte_count = $i log + " +done + test_done
-- 2.17.0.290.gded63e768a