quintodrome/core/ffmpeg/ffmpeg_test.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
620 B
Go
Raw Normal View History

2022-12-20 08:25:47 -09:00
package ffmpeg
import (
"testing"
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
2022-07-26 12:47:16 -08:00
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
2022-12-20 08:25:47 -09:00
func TestFFmpeg(t *testing.T) {
tests.Init(t, false)
log.SetLevel(log.LevelFatal)
RegisterFailHandler(Fail)
2022-12-20 08:25:47 -09:00
RunSpecs(t, "FFmpeg Suite")
}
2022-12-20 08:25:47 -09:00
var _ = Describe("createFFmpegCommand", func() {
It("creates a valid command line", func() {
2022-12-20 08:25:47 -09:00
args := createFFmpegCommand("ffmpeg -i %s -b:a %bk mp3 -", "/music library/file.mp3", 123)
Expect(args).To(Equal([]string{"ffmpeg", "-i", "/music library/file.mp3", "-b:a", "123k", "mp3", "-"}))
})
})