File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed
elixir/test/elixir/kernel Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -57,20 +57,13 @@ defmodule Kernel.CLI.SyntaxErrorTest do
5757
5858 def check_output ( elixir_cmd , expected_msg ) do
5959 o = elixir ( elixir_cmd )
60- expected_msg = to_char_list ( :unicode . characters_to_binary expected_msg )
60+ expected_msg = :unicode . characters_to_list ( expected_msg )
6161 assert :string . str ( o , expected_msg ) == 1 , "Expected this output: `#{ expected_msg } `\n but got this output: `#{ o } `"
6262 end
6363
6464 test :syntax_code_error do
6565 check_output ( '-e "[1,2"' , '** (TokenMissingError) nofile:1: missing terminator: ]' )
6666 check_output ( '-e "case 1 end"' , % C "** (SyntaxError) nofile:1: unexpected token: end" )
67- thischar = "あ"
68- if is_win? do
69- thatchar = % B "\x{3042} "
70- else
71- thatchar = :unicode . characters_to_binary ( thischar )
72- end
73- check_output ( '-e "#{ thischar } "' , '** (SyntaxError) nofile:1: invalid token: #{ thatchar } ' )
7467 check_output ( '-e "æ"' , '** (SyntaxError) nofile:1: invalid token: æ' )
7568 end
7669end
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ defmodule Mix.Shell do
6060 { :unix , _ } ->
6161 command = command
6262 |> String . replace ( "\" " , "\\ \" " )
63- |> to_char_list
63+ |> binary_to_list # We need to send bytes, not chars
6464 % c ( sh - c "#{ command } " )
6565
6666 { :win32 , osname } ->
You can’t perform that action at this time.
0 commit comments