package credits import ( "crypto/sha256" "encoding/hex" "encoding/json" "os" "testing" ) func TestLucideNoticeMatchesRecordedProvenance(t *testing.T) { raw, err := os.ReadFile("notices/lucide-provenance.json") if err != nil { t.Fatal(err) } var record struct { Source string `json:"source"` SHA256 string `json:"sha256"` Bytes int `json:"bytes"` } if err := json.Unmarshal(raw, &record); err != nil { t.Fatal(err) } sum := sha256.Sum256([]byte(lucideNotice)) if record.Source != "https://raw.githubusercontent.com/lucide-icons/lucide/a79b2d131dab2bf20cb224bd0937b439a9c4fa99/LICENSE" || record.Bytes != len(lucideNotice) || record.SHA256 != hex.EncodeToString(sum[:]) { t.Fatal("Lucide notice differs from original provenance") } }