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

mix test failed on macOS #7

Closed
wingyplus opened this issue May 6, 2021 · 2 comments · Fixed by #9
Closed

mix test failed on macOS #7

wingyplus opened this issue May 6, 2021 · 2 comments · Fixed by #9

Comments

@wingyplus
Copy link
Contributor

wingyplus commented May 6, 2021

Found 2 tests fail on macOS:

$ mix test
$ mix test
Excluding tags: [ci: true]

..............................

  1) test GenServer can use pty (OsCmdTest)
     test/os_cmd_test.exs:31
     ** (EXIT from #PID<0.416.0>) %OsCmd.Error{exit_status: nil, message: "echo 1 failed: unexpected port exit", output: nil}

.......

  2) test GenServer returns error on invalid directory (OsCmdTest)
     test/os_cmd_test.exs:19
     Assertion with =~ failed
     code:  assert error.message =~ "no such file or directory"
     left:  "dir failed: exec: \"dir\": executable file not found in $PATH"
     right: "no such file or directory"
     stacktrace:
       test/os_cmd_test.exs:22: (test)

........................

Finished in 1.2 seconds
64 tests, 2 failures, 1 excluded

Randomized with seed 875537

The macOS doesn't have dir command. I think we can replace with ls command to check this case. What do you think?

UPDATE: I open a new issue #8 for test GenServer can use pty case.

@sasa1977
Copy link
Owner

sasa1977 commented May 7, 2021

Yeah, not sure why I used dir instead of ls here. Do you mind submitting a PR?

@wingyplus
Copy link
Contributor Author

@sasa1977 PR opened here #9. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants