Initial commit: LastRecc discovery feed and weekly engine

This commit is contained in:
Joren committed 2026-11-23 12:40:14 +01:00
commit 70287e6310
40 files changed
+6972

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
package rip
import "testing"
func TestParseSearchOutput(t *testing.T) {
output := `results: 100
1. id=dpkjsfxlbkrwa | Intimate Fonk
results: 1
1. id=dpkjsfxlbkrwa | Intimate Fonk
`
hits := parseSearchOutput(output)
if len(hits) != 1 {
t.Fatalf("expected 1 deduped hit, got %d", len(hits))
}
if hits[0].ID != "dpkjsfxlbkrwa" || hits[0].Title != "Intimate Fonk" {
t.Fatalf("unexpected hit: %+v", hits[0])
}
}
func TestParseNoResults(t *testing.T) {
if hits := parseSearchOutput("no results\n"); len(hits) != 0 {
t.Fatalf("expected no hits, got %+v", hits)
}
}