cli: restore coverage that rode out with deleted dead wrappers · Entire

cli: restore coverage that rode out with deleted dead wrappers

7659dbb→main· Soph·2w ago·2 files·+399 added/-0 removed

Review feedback on the dead-code sweep: two deletions took the only tests of live logic with them.

Sessions

93a786da9959View transcript

Changes

2


func makeEditToolLine(t *testing.T, id, filePath string) string {
    t.Helper()
    return makeFileToolLine(t, "Edit", id, filePath)
}

func makeTaskToolUseLine(t *testing.T, id, toolUseID string) string {
    t.Helper()
    innerMsg := mustMarshal(t, map[string]interface{}{
        "role": "assistant",
        "content": []map[string]interface{}{
            {
                "type":  "tool_use",
                "id":    toolUseID,
                "name":  "Task",
                "input": map[string]string{"prompt": "do something"},
            },
        },
    })
    line := mustMarshal(t, map[string]interface{}{
        "type":    "message",
        "id":      id,
        "message": json.RawMessage(innerMsg),
    })
    return string(line)
}

// Example of usage in tests  
func TestCalculateTotalTokenUsageFromBytes_PerCheckpoint(t *testing.T) {
    t.Parallel()
    // Function body  
}

// More tests follow...
// Additional test functions as written above

Multiple sub tests managing JSONL data handling and file modifications follow in the original body.