[Bugfix] Ensure source metadata fetching uses windows-compatible filepaths (#193)

* Fixed underlying bug

* Refactored windows_filenames to be a global flag; added tests

* Added some random test coverage for fun
This commit is contained in:
Kieran
2024-04-17 12:51:52 -07:00
committed by GitHub
parent 6f78ec40d7
commit 88569640c9
10 changed files with 65 additions and 17 deletions
@@ -78,6 +78,14 @@ defmodule Pinchflat.YtDlp.CommandRunnerTest do
end
end
describe "run/4 when testing global options" do
test "creates windows-safe filenames" do
assert {:ok, output} = Runner.run(@media_url, [], "")
assert String.contains?(output, "--windows-filenames")
end
end
describe "version/0" do
test "adds the version arg" do
assert {:ok, output} = Runner.version()