diff options
| author | ewy <ewy0@protonmail.com> | 2026-04-29 22:45:11 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-04-29 22:45:11 +0200 |
| commit | 43a46a1a3a50e08d5a774c73a2528b877ac29451 (patch) | |
| tree | 8ef856569288a7e8e5fea594c2ae4a277d8c5526 /cache | |
| parent | 7a116ec86693d07725be6b0233f0c0bab6e65d9d (diff) | |
fix list by adding forgotten format arg
Diffstat (limited to 'cache')
| -rw-r--r-- | cache/cache_test.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/cache/cache_test.go b/cache/cache_test.go index 95ded9d..ecf07f5 100644 --- a/cache/cache_test.go +++ b/cache/cache_test.go @@ -130,10 +130,10 @@ func TestMerge(t *testing.T) { Path: "/new/mypath", Label: "mypath", } - base := Cache{Entries: []Entry{ + base := &Cache{Entries: []Entry{ a, b, }} - other := Cache{Entries: []Entry{ + other := &Cache{Entries: []Entry{ b, c, }} result := base.Merge(other) @@ -162,7 +162,7 @@ func TestNew(t *testing.T) { func TestLoadFile_NotExist(t *testing.T) { f := fstest.MapFS{} c, err := LoadFile(f, "anything is fine") - assert.Nil(t, c.Entries) + assert.Nil(t, c) assert.NoError(t, err) } @@ -170,8 +170,7 @@ func TestLoadFile_NotExist(t *testing.T) { func TestSaveFile(t *testing.T) { dir := t.TempDir() loc := filepath.Join(dir, "savefile") - st := TState(TSource("source_one", "target"), TSource("second_source", "t1", "t2", "t3")) - c := Cache{Entries: []Entry{ + c := &Cache{Entries: []Entry{ { Path: "path", Label: "label", @@ -181,6 +180,6 @@ func TestSaveFile(t *testing.T) { Label: "", }, }} - err := SaveFile(loc, st, c) + err := SaveFile(loc, c) assert.NoError(t, err) } |
