diff --git a/test/ffmpex_test.exs b/test/ffmpex_test.exs index 52d2459..51eb88b 100644 --- a/test/ffmpex_test.exs +++ b/test/ffmpex_test.exs @@ -66,7 +66,8 @@ defmodule FFmpexTest do |> add_input_file(@fixture) |> add_output_file(@output_path) - assert {:error, {_, 1}} = execute(command) + assert {:error, {_, exit_status}} = execute(command) + assert exit_status == 1 || exit_status == 8 end test "can prepare arguments" do @@ -88,7 +89,7 @@ defmodule FFmpexTest do test "can get output from stdout" do command = FFmpex.new_command() - |> add_input_file(@fixture) + |> add_input_file(@fixture) |> to_stdout() |> add_file_option(option_f("avi")) diff --git a/test/ffprobe_test.exs b/test/ffprobe_test.exs index c5a60e6..a8e2ced 100755 --- a/test/ffprobe_test.exs +++ b/test/ffprobe_test.exs @@ -11,7 +11,8 @@ defmodule FFprobeTest do @fixture_non_media_file __ENV__.file test "correct duration" do - assert 21.0 == FFprobe.duration(@fixture) + duration = FFprobe.duration(@fixture) + assert duration > 20.9 && duration <= 21.0 end test "handles N/A duration" do