diff options
| author | Aidan Nulman <[email protected]> | 2014-04-03 16:41:43 -0400 |
|---|---|---|
| committer | Aidan Nulman <[email protected]> | 2014-04-03 16:41:43 -0400 |
| commit | d9f4adff6c548a6cb6f00258c99129c7e41062b3 (patch) | |
| tree | 264a73dcf05f99cec7395b20b3488ea202c3cadf /git_test.go | |
| parent | b5e60dc106828b308fdb7e69fe10a0d2dec4eece (diff) | |
| parent | 9cd1d129bcd567ef65137783a603f8d898d8d933 (diff) | |
Merge branch 'master' into custom_odb
Conflicts:
odb.go
wrapper.c
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") + } +} |
