mirror of
https://github.com/u2takey/ffmpeg-go.git
synced 2025-10-03 07:12:20 +08:00
Move platform-specific code under build tags; fix corresponding tests
This commit is contained in:
20
ffmpeg_windows_test.go
Normal file
20
ffmpeg_windows_test.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package ffmpeg_go
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"syscall"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestCompileWithOptions(t *testing.T) {
|
||||
out := Input("dummy.mp4").Output("dummy2.mp4")
|
||||
cmd := out.Compile(func(s *Stream, cmd *exec.Cmd) {
|
||||
if cmd.SysProcAttr == nil {
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{}
|
||||
}
|
||||
cmd.SysProcAttr.HideWindow = true
|
||||
})
|
||||
assert.Equal(t, true, cmd.SysProcAttr.HideWindow)
|
||||
}
|
Reference in New Issue
Block a user