mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-29 18:01:36 +03:00
25 lines
620 B
Go
25 lines
620 B
Go
package ffmpeg
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/navidrome/navidrome/log"
|
|
"github.com/navidrome/navidrome/tests"
|
|
. "github.com/onsi/ginkgo/v2"
|
|
. "github.com/onsi/gomega"
|
|
)
|
|
|
|
func TestFFmpeg(t *testing.T) {
|
|
tests.Init(t, false)
|
|
log.SetLevel(log.LevelFatal)
|
|
RegisterFailHandler(Fail)
|
|
RunSpecs(t, "FFmpeg Suite")
|
|
}
|
|
|
|
var _ = Describe("createFFmpegCommand", func() {
|
|
It("creates a valid command line", func() {
|
|
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", "-"}))
|
|
})
|
|
})
|