Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/iex/test/iex/autocomplete_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ defmodule IEx.AutocompleteTest do
end

test "Erlang module multiple values completion" do
{:yes, '', list} = expand(':user')
assert 'user' in list
assert 'user_drv' in list
{:yes, '', list} = expand(':logger')
assert 'logger' in list
assert 'logger_proxy' in list
end

test "Erlang root completion" do
Expand Down
9 changes: 7 additions & 2 deletions lib/iex/test/iex/interaction_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,13 @@ defmodule IEx.InteractionTest do
test "inspect opts" do
opts = [inspect: [binaries: :as_binaries, charlists: :as_lists, structs: false, limit: 4]]

assert capture_iex("<<45, 46, 47>>\n[45, 46, 47]\n%IO.Stream{}", opts) ==
"<<45, 46, 47>>\n[45, 46, 47]\n%{__struct__: IO.Stream, device: nil, line_or_bytes: :line, raw: true}"
assert "<<45, 46, 47>>\n[45, 46, 47]\n%{" <> map =
capture_iex("<<45, 46, 47>>\n[45, 46, 47]\n%IO.Stream{}", opts)

assert map =~ "__struct__: IO.Stream"
assert map =~ "device: nil"
assert map =~ "line_or_bytes: :line"
assert map =~ "raw: true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we backported sort_maps to v1.14 but this approach is also fine :)

end

test "exception" do
Expand Down