feat(music): friendly cross-platform ffmpeg-missing error
This commit is contained in:
@@ -402,3 +402,16 @@ func TestResolveFFprobeEnv(t *testing.T) {
|
||||
t.Fatalf("expected '/custom/ffprobe', got %q", path)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFFmpegMissingErrHasInstallHints(t *testing.T) {
|
||||
msg := ffmpegMissingErr("ffmpeg").Error()
|
||||
for _, want := range []string{"ffmpeg", "winget", "brew", "apt", "SOW_FFMPEG"} {
|
||||
if !strings.Contains(msg, want) {
|
||||
t.Errorf("ffmpeg error missing %q; got:\n%s", want, msg)
|
||||
}
|
||||
}
|
||||
probe := ffmpegMissingErr("ffprobe").Error()
|
||||
if !strings.Contains(probe, "SOW_FFPROBE") {
|
||||
t.Errorf("ffprobe error should mention SOW_FFPROBE; got:\n%s", probe)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user