Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanding collect to other methods and testing #5

Merged
merged 2 commits into from
Jul 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/FFMPEG.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,8 @@ built with clang version 6.0.1 (tags/RELEASE_601/final)
[...]
```
"""
function exe(args::AbstractString...; command = FFMPEG.ffmpeg)
exe(args::AbstractString...; command = FFMPEG.ffmpeg, collect = false) = exe(Cmd([command, args...]), command=command, collect=collect)

withenv(execenv) do
Base.run(Cmd([command, args...]))
end

end

"""
collectexecoutput(exec::Cmd) -> Array of output lines
Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ end
@show FFMPEG.versioninfo()
@test text_execute(() -> FFMPEG.exe("-version"))
@test text_execute(() -> FFMPEG.exe(`-version`))
@test text_execute(() -> FFMPEG.exe(`-version`, collect=true))
@test text_execute(() -> FFMPEG.ffmpeg_exe(`-version`))
@test text_execute(() -> FFMPEG.ffprobe_exe(`-version`))
@test text_execute(() -> ffmpeg`-version`)
Expand Down