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
57
57
58
58
def check_output ( elixir_cmd , expected_msg ) do
59
59
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 )
61
61
assert :string . str ( o , expected_msg ) == 1 , "Expected this output: `#{ expected_msg } `\n but got this output: `#{ o } `"
62
62
end
63
63
64
64
test :syntax_code_error do
65
65
check_output ( '-e "[1,2"' , '** (TokenMissingError) nofile:1: missing terminator: ]' )
66
66
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 } ' )
74
67
check_output ( '-e "æ"' , '** (SyntaxError) nofile:1: invalid token: æ' )
75
68
end
76
69
end
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ defmodule Mix.Shell do
60
60
{ :unix , _ } ->
61
61
command = command
62
62
|> String . replace ( "\" " , "\\ \" " )
63
- |> to_char_list
63
+ |> binary_to_list # We need to send bytes, not chars
64
64
% c ( sh - c "#{ command } " )
65
65
66
66
{ :win32 , osname } ->
You can’t perform that action at this time.
0 commit comments