summaryrefslogtreecommitdiff
path: root/git_test.go
diff options
context:
space:
mode:
authorJesse Ezell <[email protected]>2014-04-04 00:50:41 -0700
committerJesse Ezell <[email protected]>2014-04-04 00:50:41 -0700
commitfc999289a2f4855dec72d52d360319362a2360a1 (patch)
treef65f3cce0db4003a35c50e4df297b9ae42622f60 /git_test.go
parent39f59d921b7acc0bea40e1cadb7fb7bceabfbc6e (diff)
parent8982f4b3be90a04b0fad24da1ee6d85b1caad336 (diff)
Merge branch 'oid-parse-protection' into branch-iterator
Diffstat (limited to 'git_test.go')
-rw-r--r--git_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/git_test.go b/git_test.go
index 6542ca0..f4515a6 100644
--- a/git_test.go
+++ b/git_test.go
@@ -62,3 +62,10 @@ func TestOidZero(t *testing.T) {
t.Error("Zero Oid is not zero")
}
}
+
+func TestEmptyOid(t *testing.T) {
+ _, err := NewOid("")
+ if err == nil || !IsErrorCode(err, ErrGeneric) {
+ t.Fatal("Should have returned invalid error")
+ }
+}