Code.Normalizer: Use correct meta fields in normalize_call/2 (#12389)

This commit is contained in:
Zach Allaun
2023-02-09 22:43:22 +01:00
committed by GitHub
parent 157abf0c8a
commit f91a0ff770
2 changed files with 24 additions and 2 deletions
@@ -507,6 +507,28 @@ defmodule Code.Normalizer.FormatterASTTest do
# after
""",
literal_encoder: fn literal, _ -> {:ok, literal} end
assert_same """
block do
# before 1
1 + 1
# before 2
2 + 2
end
""",
literal_encoder: fn literal, _ -> {:ok, literal} end
assert_same """
block do
# before 1
Mix.install([1 + 1])
# before 2
Mix.install([2 + 2])
end
""",
literal_encoder: fn literal, _ -> {:ok, literal} end
end
test "before and after expressions with newlines" do