(t *testing.T)
| 23 | } |
| 24 | |
| 25 | func TestAppendLongTerm(t *testing.T) { |
| 26 | dir := t.TempDir() |
| 27 | ms := NewMemoryStore(dir, testLogger()) |
| 28 | |
| 29 | _ = ms.WriteLongTerm("line1") |
| 30 | _ = ms.AppendLongTerm("line2") |
| 31 | |
| 32 | content := ms.ReadLongTerm() |
| 33 | if !strings.Contains(content, "line1") || !strings.Contains(content, "line2") { |
| 34 | t.Errorf("expected both lines, got %q", content) |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | func TestReadLongTerm_NoFile(t *testing.T) { |
| 39 | ms := NewMemoryStore(t.TempDir(), testLogger()) |
nothing calls this directly
no test coverage detected