summaryrefslogtreecommitdiff
path: root/git_test.go
diff options
context:
space:
mode:
authorJesse Ezell <[email protected]>2014-03-20 22:02:19 -0700
committerJesse Ezell <[email protected]>2014-03-20 22:02:19 -0700
commit37964e878f70229171f94668cb96f347b798e2b2 (patch)
tree5781761e13e57edb3589844b6faa799c1158b93a /git_test.go
parentd0b334b24409ddc190a7010be0072d87df6b6bfe (diff)
parent2811845a1287d949a74b8ed80a5791fd8875002a (diff)
merge with latest
Diffstat (limited to 'git_test.go')
-rw-r--r--git_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/git_test.go b/git_test.go
index 2f586b5..e6372fb 100644
--- a/git_test.go
+++ b/git_test.go
@@ -15,6 +15,17 @@ func createTestRepo(t *testing.T) *Repository {
tmpfile := "README"
err = ioutil.WriteFile(path+"/"+tmpfile, []byte("foo\n"), 0644)
+
+ checkFatal(t, err)
+
+ return repo
+}
+
+func createBareTestRepo(t *testing.T) *Repository {
+ // figure out where we can create the test repo
+ path, err := ioutil.TempDir("", "git2go")
+ checkFatal(t, err)
+ repo, err := InitRepository(path, true)
checkFatal(t, err)
return repo
@@ -73,3 +84,11 @@ func updateReadme(t *testing.T, repo *Repository, content string) (*Oid, *Oid) {
return commitId, treeId
}
+
+func TestOidZero(t *testing.T) {
+ var zeroId Oid
+
+ if !zeroId.IsZero() {
+ t.Error("Zero Oid is not zero")
+ }
+}