Add a test for blobs
This has been in my worktree unadded for a while.
This commit is contained in:
parent
d9dfc4bce8
commit
c77c8f6fb9
|
@ -0,0 +1,18 @@
|
||||||
|
package git
|
||||||
|
|
||||||
|
import (
|
||||||
|
"os"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestCreateBlobFromBuffer(t *testing.T) {
|
||||||
|
repo := createTestRepo(t)
|
||||||
|
defer os.RemoveAll(repo.Workdir())
|
||||||
|
|
||||||
|
id, err := repo.CreateBlobFromBuffer(make([]byte, 0))
|
||||||
|
checkFatal(t, err)
|
||||||
|
|
||||||
|
if id.String() != "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391" {
|
||||||
|
t.Fatal("Empty buffer did not deliver empty blob id")
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue