sheepflix/internal/api/api_test.go

18 lines
475 B
Go
Raw Permalink Normal View History

2026-08-26 02:16:50 -04:00
package api
import "testing"
func TestIsTextSubtitleCodec(t *testing.T) {
for _, codec := range []string{"ass", "ssa", "subrip", "srt", "text", "webvtt", "mov_text", "SUBRIP"} {
if !isTextSubtitleCodec(codec) {
t.Errorf("expected %q to be treated as text", codec)
}
}
for _, codec := range []string{"hdmv_pgs_subtitle", "dvd_subtitle", "dvb_subtitle", ""} {
if isTextSubtitleCodec(codec) {
t.Errorf("expected %q to require bitmap handling", codec)
}
}
}