diff options
| author | Jesse Ezell <[email protected]> | 2014-04-04 00:26:22 -0700 |
|---|---|---|
| committer | Jesse Ezell <[email protected]> | 2014-04-04 00:26:22 -0700 |
| commit | 8319a792f3184714d8f2bfa562523d1a91a9392c (patch) | |
| tree | c3914d4a38355f9145884c3a278b81fbb428ce46 /git_test.go | |
| parent | 5590078e6ff04be425b4a833adb44a0845c0b52f (diff) | |
| parent | 9cd1d129bcd567ef65137783a603f8d898d8d933 (diff) | |
Merge remote-tracking branch 'libgit/master' into branch-iterator
Diffstat (limited to 'git_test.go')
| -rw-r--r-- | git_test.go | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/git_test.go b/git_test.go index 52aea1d..6542ca0 100644 --- a/git_test.go +++ b/git_test.go @@ -1,8 +1,8 @@ package git import ( - "testing" "io/ioutil" + "testing" "time" ) @@ -14,7 +14,17 @@ func createTestRepo(t *testing.T) *Repository { checkFatal(t, err) tmpfile := "README" - err = ioutil.WriteFile(path + "/" + tmpfile, []byte("foo\n"), 0644) + 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 @@ -45,3 +55,10 @@ func seedTestRepo(t *testing.T, repo *Repository) (*Oid, *Oid) { return commitId, treeId } +func TestOidZero(t *testing.T) { + var zeroId Oid + + if !zeroId.IsZero() { + t.Error("Zero Oid is not zero") + } +} |
