fix(jukebox): fix mpv command and template parsing (#4162)
* test(mpv): add unit tests for MPV command generation and execution Signed-off-by: Deluan <deluan@navidrome.org> * fix(mpv): improve command template parsing Signed-off-by: Deluan <deluan@navidrome.org> * fix(mpv): update mock script to output arguments to stdout instead of a file Signed-off-by: Deluan <deluan@navidrome.org> * test(mpv): add test suite for MPV command functionality Signed-off-by: Deluan <deluan@navidrome.org> * fix(mpv): improve MPV command template parsing to handle quoted arguments Signed-off-by: Deluan <deluan@navidrome.org> * fix(mpv): simplify MPV command check by removing unnecessary string containment Signed-off-by: Deluan <deluan@navidrome.org> * fix(mpv): add error handling for empty command arguments and malformed templates Signed-off-by: Deluan <deluan@navidrome.org> --------- Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package mpv
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/navidrome/navidrome/log"
|
||||
"github.com/navidrome/navidrome/tests"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
func TestMPV(t *testing.T) {
|
||||
tests.Init(t, false)
|
||||
log.SetLevel(log.LevelFatal)
|
||||
RegisterFailHandler(Fail)
|
||||
RunSpecs(t, "MPV Suite")
|
||||
}
|
||||
Reference in New Issue
Block a user