17 lines
475 B
Go
17 lines
475 B
Go
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)
|
|
}
|
|
}
|
|
}
|