Skip to content

Commit 9d62e67

Browse files
author
José Valim
committed
Fix test suite
1 parent 58ca340 commit 9d62e67

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/elixir/lib/io/ansi/docs.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,6 @@ defmodule IO.ANSI.Docs do
375375
"they now must be a list of atoms, got #{inspect color} for #{inspect style}"
376376
color = String.split(color, ",") |> Enum.map(&String.to_atom/1)
377377
end
378-
IO.ANSI.format_fragment(color, !!colors[:enabled])
378+
IO.ANSI.format_fragment(color, colors[:enabled])
379379
end
380380
end

lib/logger/test/logger/backends/console_test.exs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ defmodule Logger.Backends.ConsoleTest do
5656

5757
assert capture_log(fn ->
5858
Logger.debug("hello")
59-
end) == IO.ANSI.magenta() <> "hello" <> IO.ANSI.reset()
59+
end) == IO.ANSI.cyan() <> "hello" <> IO.ANSI.reset()
6060

61-
Logger.configure_backend(:console, [colors: [debug: :cyan]])
61+
Logger.configure_backend(:console, [colors: [debug: :magenta]])
6262

6363
assert capture_log(fn ->
6464
Logger.debug("hello")
65-
end) == IO.ANSI.cyan() <> "hello" <> IO.ANSI.reset()
65+
end) == IO.ANSI.magenta() <> "hello" <> IO.ANSI.reset()
6666

6767
assert capture_log(fn ->
6868
Logger.info("hello")
69-
end) == IO.ANSI.normal() <> "hello" <> IO.ANSI.reset()
69+
end) == IO.ANSI.green() <> "hello" <> IO.ANSI.reset()
7070

7171
Logger.configure_backend(:console, [colors: [info: :cyan]])
7272

@@ -86,7 +86,7 @@ defmodule Logger.Backends.ConsoleTest do
8686

8787
assert capture_log(fn ->
8888
Logger.error("hello")
89-
end) == IO.ANSI.red() <> "hello" <> IO.ANSI.reset()
89+
end) == IO.ANSI.magenta() <> "hello" <> IO.ANSI.reset()
9090

9191
Logger.configure_backend(:console, [colors: [error: :cyan]])
9292

0 commit comments

Comments
 (0)