Do not escape dbg options, closes #14839
This commit is contained in:
@@ -2700,7 +2700,7 @@ defmodule Macro do
|
||||
:ok
|
||||
end
|
||||
|
||||
prelude = quote do: options = unquote(Macro.escape(options))
|
||||
prelude = quote do: options = unquote(options)
|
||||
acc = {prelude, dbg_format_header(env)}
|
||||
|
||||
{acc, nil} =
|
||||
|
||||
@@ -1484,6 +1484,11 @@ defmodule KernelTest do
|
||||
assert output =~ "3"
|
||||
end
|
||||
|
||||
test "prints the given expression with complex options" do
|
||||
output = capture_io(fn -> assert dbg(123, [] ++ []) == 123 end)
|
||||
assert output =~ "kernel_test.exs"
|
||||
end
|
||||
|
||||
test "doesn't print any colors if :syntax_colors is []" do
|
||||
output =
|
||||
capture_io(fn ->
|
||||
|
||||
Reference in New Issue
Block a user