From 412ce4acc4e7610cfa7e5dd4e8bfb65ae547bd47 Mon Sep 17 00:00:00 2001 From: jw2013 Date: Tue, 3 Feb 2015 01:22:51 -0800 Subject: [PATCH] fix broken system path test --- lib/elixir/test/elixir/system_test.exs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/elixir/test/elixir/system_test.exs b/lib/elixir/test/elixir/system_test.exs index df04091407..b30807ecd5 100644 --- a/lib/elixir/test/elixir/system_test.exs +++ b/lib/elixir/test/elixir/system_test.exs @@ -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"]))