go-whisper-api/transcode/aac_decode_test.go
admin b5c083e06f
Some checks failed
CodeQL / Analyze (go) (push) Successful in 6m28s
Docker Image / build-docker (push) Failing after 13m26s
Lint and Testing / lint (push) Successful in 11m17s
Lint and Testing / test (push) Successful in 11m17s
Lint and Testing / golangci (push) Successful in 2m40s
first commit
2026-06-04 18:10:52 +07:00

32 lines
712 B
Go

package transcode
import "testing"
func TestAacOpenName_mp4(t *testing.T) {
got := aacOpenName("/tmp/cache/input.mp4", ".mp4")
if got != "input.m4a" {
t.Fatalf("got %q want input.m4a", got)
}
}
func TestAacOpenName_noExt(t *testing.T) {
got := aacOpenName("/tmp/input", ".m4a")
if got != "audio.m4a" {
t.Fatalf("got %q", got)
}
}
func TestAacContainerExt(t *testing.T) {
cases := map[string]string{
".mp4": ".m4a",
".mov": ".m4a",
".aac": ".aac",
".m4a": ".m4a",
}
for in, want := range cases {
if got := aacContainerExt(in); got != want {
t.Fatalf("%s: got %q want %q", in, got, want)
}
}
}