Re: [PATCH v2 09/16] tag: add more incompatibles mode tests
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Mar 21, 2017, 18:58 UTC
- Message-ID
- <CACBZZX4jXtYqnsYuHRohF+zx+y0VyyRudMMYjtLuxoCziccd=w@mail.gmail.com>
- In-Reply-To
- <xmqqshm6pjja.fsf@gitster.mtv.corp.google.com>
On Tue, Mar 21, 2017 at 7:32 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes: > >> Amend the test suite to test for more invalid uses like "-l -a" >> etc. This mainly tests the `(argc == 0 && !cmdmode)` -> >> `((create_tag_object || force) && (cmdmode != 0))` code path in >> builtin/tag.c. > > The second sentence is now stale, isn't it?
I've reworded this in WIP v3 to split out the code from the text, making this less confusing.
Show 30 quoted lines
>> >> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> >> --- >> t/t7004-tag.sh | 13 +++++++++++++ >> 1 file changed, 13 insertions(+) >> >> diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh >> index 63ee2cf727..958c77ab86 100755 >> --- a/t/t7004-tag.sh >> +++ b/t/t7004-tag.sh >> @@ -1455,6 +1455,19 @@ test_expect_success 'checking that initial commit is in all tags' " >> >> test_expect_success 'mixing incompatibles modes and options is forbidden' ' >> test_must_fail git tag -a && >> + test_must_fail git tag -a -l && >> + test_must_fail git tag -s && >> + test_must_fail git tag -s -l && >> + test_must_fail git tag -m && >> + test_must_fail git tag -m -l && >> + test_must_fail git tag -m "hlagh" && >> + test_must_fail git tag -m "hlagh" -l && >> + test_must_fail git tag -F && >> + test_must_fail git tag -F -l && >> + test_must_fail git tag -f && >> + test_must_fail git tag -f -l && >> + test_must_fail git tag -a -s -m -F && >> + test_must_fail git tag -a -s -m -F -l && >> test_must_fail git tag -l -v && >> test_must_fail git tag -n 100 && >> test_must_fail git tag -l -m msg &&