Re: [PATCH 1/5] Add test case for basic commit functionality.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 31, 2007, 04:18 UTC
- Message-ID
- <7vodhtgq99.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <11858309261111-git-send-email-krh@redhat.com>
Kristian Høgsberg <krh@redhat.com> writes:
> +# Pick a date so we get consistent commits. 7/7/07 means good luck! > +export GIT_AUTHOR_DATE="July 7, 2007" > +export GIT_COMMITTER_DATE="July 7, 2007"
Other scripts use test_tick for consistent commits; just to let you know, the above is as good if you intend to use only one timestamp.
Show 5 quoted lines
> +echo "bongo bongo" >file > +test_expect_success \ > + "initial status" \ > + "git-add file && \ > + git-status | grep 'Initial commit'"
We tend to prefer to have the "create testfile" part also in the test.
> +test_expect_failure \ > + "fail initial amend" \ > + "git-commit -m initial --amend"
Does it fail because it is initial, or because these two options, "-m <msg>" and "--amend", are incompatible?
> +echo "bongo bongo bongo" >file
Ditto.
Show 6 quoted lines
> +cat >msg <<EOF > + > + > + > +Signed-off-by: hula > +EOF
... except <<here text are left outside of test_expect_success because there were reports that some shells cannot grok here text in eval correctly.