MCPcopy Create free account
hub / github.com/diillson/chatcli / TestSaveCheckpointMaxLimit

Function TestSaveCheckpointMaxLimit

cli/rewind_test.go:39–51  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

37}
38
39func TestSaveCheckpointMaxLimit(t *testing.T) {
40 cli := &ChatCLI{
41 history: []models.Message{{Role: "user", Content: "test"}},
42 }
43
44 for i := 0; i < maxCheckpoints+5; i++ {
45 cli.saveCheckpoint()
46 }
47
48 if len(cli.checkpoints) != maxCheckpoints {
49 t.Errorf("expected max %d checkpoints, got %d", maxCheckpoints, len(cli.checkpoints))
50 }
51}
52
53func TestSaveCheckpointLabelTruncation(t *testing.T) {
54 longMsg := ""

Callers

nothing calls this directly

Calls 2

saveCheckpointMethod · 0.95
ErrorfMethod · 0.80

Tested by

no test coverage detected