Re: [PATCH v2 04/22] test-lib functions: add --printf option to test_commit
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 30, 2021, 23:11 UTC
- Message-ID
- <xmqqh7ksb5j7.fsf@gitster.g>
- In-Reply-To
- <20210216115801.4773-5-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 5 quoted lines
> test_expect_success 'can parse blob ending with CR' ' > - printf "[some]key = value\\r" >config && > - git add config && > - git commit -m CR && > + test_commit --printf CR config "[some]key = value\\r" &&
OK, the first arg becomes the commit title, and the second one is used for the filename, and the next arg is the string given to printf, I guess.
Show 5 quoted lines
> test_expect_success 'rerere forget (binary)' ' > git checkout -f side && > - printf "a\0c" >binary && > - git commit -a -m binary && > + test_commit binary binary "a\0c" &&
This lacks --printf. Are we breaking the test but "test-must-fail" is hiding the breakage here?
> test_must_fail git merge second && > git rerere forget binary > '