Fix Code.Normalizer for keyword operand with :do key (#13250)

This commit is contained in:
Jean Klingler
2024-01-13 17:58:45 +09:00
committed by GitHub
parent 53f45a93b6
commit bc50d94943
2 changed files with 9 additions and 5 deletions
@@ -539,6 +539,10 @@ defmodule Code.Normalizer.QuotedASTTest do
"\e[34m[\e[0m\e[32ma:\e[0m \e[33m1\e[0m, \e[32mb:\e[0m \e[33m2\e[0m\e[34m]\e[0m"
end
test "keyword list with :do as operand" do
assert quoted_to_string(quote(do: a = [do: 1])) == "a = [do: 1]"
end
test "interpolation" do
assert quoted_to_string(quote(do: "foo#{bar}baz")) == ~S["foo#{bar}baz"]
end