fix broken system path test

This commit is contained in:
jw2013
2015-02-03 01:22:51 -08:00
parent 524f986cac
commit 412ce4acc4
+6 -1
View File
@@ -73,7 +73,12 @@ defmodule SystemTest do
File.cp! System.find_executable("echo"), echo2
relative = Path.relative_to_cwd(echo2)
assert :enoent = catch_error(System.cmd(relative, ["hello"]))
if Path.absname(relative) == relative do
assert {"hello\n", 0} = System.cmd(relative, ["hello"])
else
assert :enoent = catch_error(System.cmd(relative, ["hello"]))
end
File.cd! dir, fn ->
assert :enoent = catch_error(System.cmd("echo2", ["hello"]))