git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Kuleshov <kuleshovmail@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Alexander Kuleshov <kuleshovmail@gmail.com>
Subject: [PATCH 2/3] t1007-hash-object: add tests for verbose hash-object
Date: Mon,  2 Mar 2015 19:55:23 +0600	[thread overview]
Message-ID: <1425304523-14425-1-git-send-email-kuleshovmail@gmail.com> (raw)
In-Reply-To: <1425304500-14117-1-git-send-email-kuleshovmail@gmail.com>

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 t/t1007-hash-object.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh
index f83df8e..fa957bf 100755
--- a/t/t1007-hash-object.sh
+++ b/t/t1007-hash-object.sh
@@ -201,4 +201,15 @@ test_expect_success 'corrupt tag' '
 	test_must_fail git hash-object -t tag --stdin </dev/null
 '
 
+filename="hello"
+hello_sha1_verbose="$hello_sha1\t$filename"
+
+test_expect_success 'hash-object verbose' '
+	test "$(echo $hello_sha1_verbose)" = "$(git hash-object -v $filename)"
+'
+
+test_expect_success "Can't use --verbose and --stdin together" '
+	echo example | test_must_fail git hash-object --verbose --stdin
+'
+
 test_done
-- 
2.3.1.167.g7f4ba4b.dirty

  reply	other threads:[~2015-03-02 13:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02 13:55 [PATCH 1/3] hash-object: add -v/--verbose option Alexander Kuleshov
2015-03-02 13:55 ` Alexander Kuleshov [this message]
2015-03-02 13:55 ` [PATCH 3/3] Documentation/git-hash-object.txt: add verbose option for hash-object Alexander Kuleshov
2015-03-02 15:12 ` [PATCH 1/3] hash-object: add -v/--verbose option Michael J Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425304523-14425-1-git-send-email-kuleshovmail@gmail.com \
    --to=kuleshovmail@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).