   end
 end
 
-defmodule Kernel.CLI.SyntaxErrorTest do
-  use ExUnit.Case, async: true
-
-  defp check_output(elixir_cmd, expected_msg) do
-    o = elixir(elixir_cmd)
-    assert :string.str(o, expected_msg) == 1, "Expected this output: `#{expected_msg}`\nbut got this output: `#{o}`"
-  end
-
-  test :syntax_code_error do
-    check_output('-e "[1,2"', '** (TokenMissingError) nofile:1: missing terminator: ]')
-    check_output('-e "case 1 end"', %C"** (SyntaxError) nofile:1: unexpected token: end")
-  end
-end
-
 defmodule Kernel.CLI.CompileTest do
   use ExUnit.Case, async: true
 
-  test :compile_code do
+  test "compiles code" do
     fixture = fixture_path "compile_sample.ex"
     assert elixirc('#{fixture} -o #{tmp_path}') == ''
     assert File.regular?(tmp_path "Elixir.CompileSample.beam")

  use ExUnit.Case
  import ExUnit.CaptureIO

  test :files do
    fixtures = [fixture_path("parallel_compiler/bar.ex"), fixture_path("parallel_compiler/foo.ex")]
    assert capture_io(fn ->
      assert [Bar, Foo] = Kernel.ParallelCompiler.files fixtures
    end) =~ "message_from_foo"
  end

  test :warnings_as_errors do
    warnings_as_errors = Code.compiler_options[:warnings_as_errors]

    try do

defmodule Kernel.CLI.ErrorTest do
  use ExUnit.Case, async: true

  test "properly format errors" do
    assert :string.str('** (throw) 1', elixir('-e "throw 1"')) == 0
    assert :string.str('** (ErlangError) erlang error: 1', elixir('-e "error 1"')) == 0

