Preserve user choice on parenthesis before do block (#11061)

This commit is contained in:
Dorgan
2021-06-11 21:36:15 +02:00
committed by GitHub
parent 7b98873cb9
commit 7fbe2ae120
2 changed files with 17 additions and 1 deletions
@@ -344,6 +344,22 @@ defmodule Code.Normalizer.FormatterASTTest do
end
end
describe "preserves user choice on parenthesis" do
test "in functions with do blocks" do
assert_same(~S"""
foo Bar do
:ok
end
""")
assert_same(~S"""
foo(Bar) do
:ok
end
""")
end
end
describe "preserves formatting for sigils" do
test "without interpolation" do
assert_same ~S[~s(foo)]