Re: [PATCH revised] git_mkstemps: add test suite test
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 6, 2013, 18:17 UTC
- Message-ID
- <7vsiymfzuh.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <201308061805.r76I51If026086@freeze.ariadne.com>
worley@alum.mit.edu (Dale R. Worley) writes:
Show 15 quoted lines
> Commit a2cb86 ("git_mkstemps: correctly test return value of open()",
> 12 Jul 2013) fixes a bug regarding testing the return of an open()
> call for success/failure. Add a testsuite test for that fix. The
> test exercises a situation where that open() is known to return 0.
>
> Signed-off-by: Dale Worley <worley@ariadne.com>
> ---
> This version of the patch cleans up a number of errors in my previous
> version (which were ultimately due to my faulty updating of my master
> branch). The commit that added the open() test is now correctly
> described. Since the test was not present in the test suite at all,
> the patch is described as adding the test rather than improving it.
>
> a2cb86 is on branch tr/fd-gotcha-fixes, but that has been merged into
> master now.Thanks. I thought I've already queued
Message-ID: <7vfvuokpr0.fsf@alter.siamese.dyndns.org> aka http://article.gmane.org/gmane.comp.version-control.git/231680
which tests
git commit --allow-empty -m message <&-
> +test_expect_success 'git_mkstemps_mode does not fail if fd 0 is not open' ' > + git init &&
This does not do anything useful; you are in the test playpen aka "trash" which is an already initialized git repository.
> + echo Test. >test-file && > + git add test-file &&
You do not have to have extra contents...
> + git commit -m Message. <&-
...you can do with just "--allow-empty" instead.