diff options
Diffstat (limited to 'index_test.go')
| -rw-r--r-- | index_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/index_test.go b/index_test.go index 9b54945..9283b83 100644 --- a/index_test.go +++ b/index_test.go @@ -83,6 +83,10 @@ func TestIndexAddAndWriteTreeTo(t *testing.T) { idx, err := NewIndex() checkFatal(t, err) + if idx.Path() != "" { + t.Fatal("in-memory repo has a path") + } + entry := IndexEntry{ Path: "README", Id: blobID, @@ -163,6 +167,10 @@ func TestIndexOpen(t *testing.T) { idx, err := OpenIndex(path) checkFatal(t, err) + if path != idx.Path() { + t.Fatalf("mismatched index paths, expected %v, got %v", path, idx.Path()) + } + err = idx.Write() checkFatal(t, err) |
