mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-03 22:25:57 +00:00
Fix pruning on DiskCache object creation
This commit is contained in:
parent
8fdbf8d7da
commit
712faa7aa5
2 changed files with 26 additions and 11 deletions
|
|
@ -69,4 +69,10 @@ func TestDiskCache(t *testing.T) {
|
|||
ak("k1", "k2")
|
||||
dc.Add("k3", map[string][]byte{"1": []byte(strings.Repeat("a", int(dc.MaxSize)-10))})
|
||||
ak("k3", "k2")
|
||||
// check that creating a new disk cache prunes
|
||||
_, err = NewDiskCache(tdir, dc.MaxSize-8)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
ak("k3")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue