[PATCH 2/3] t1007-hash-object: add tests for verbose hash-object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Alexander Kuleshov <kuleshovmail@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]