Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-akya committed Sep 20, 2024
1 parent 3cfe967 commit c205175
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/ex_cmd/process_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ defmodule ExCmd.ProcessTest do
assert os_process_alive?(os_pid)

# ensure the script set the correct signal handlers (handlers to ignore signal)
assert {:ok, "ignored signals\n"} = Process.read(s)
assert {:ok, "ignored signals\n" <> _} = Process.read(s)

# exit without waiting for the exile process
{os_pid, s}
Expand Down Expand Up @@ -271,7 +271,9 @@ defmodule ExCmd.ProcessTest do

test "check command that does not take any input or produce output" do
{:ok, s} = Process.start_link(["sh", "-c", "./forever.sh"])
assert {:error, :killed} == Process.await_exit(s)
assert ret = Process.await_exit(s)

Check warning on line 274 in test/ex_cmd/process_test.exs

View workflow job for this annotation

GitHub Actions / Linux OTP 24.x / Elixir 1.14.x

variable "ret" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 274 in test/ex_cmd/process_test.exs

View workflow job for this annotation

GitHub Actions / Linux OTP 25.x / Elixir 1.15.x

variable "ret" is unused (if the variable is not meant to be used, prefix it with an underscore)
# process might die with different reason due to race condition
assert rret in [{:error, :killed}, {:ok, 127}]

Check warning on line 276 in test/ex_cmd/process_test.exs

View workflow job for this annotation

GitHub Actions / Linux OTP 24.x / Elixir 1.14.x

variable "rret" does not exist and is being expanded to "rret()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 276 in test/ex_cmd/process_test.exs

View workflow job for this annotation

GitHub Actions / Linux OTP 24.x / Elixir 1.14.x

** (CompileError) test/ex_cmd/process_test.exs:276: undefined function rret/0 (expected ExCmd.ProcessTest to define such a function or for it to be imported, but none are available)
end

test "writing binary larger than pipe buffer size" do
Expand Down

0 comments on commit c205175

Please sign in to comment.