-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switched to minipeg for color parsing
Hex RGB added Next: Fix dialyzer Fix warnings Get to test coverage 100%
- Loading branch information
1 parent
771fd5a
commit dabbcca
Showing
9 changed files
with
106 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
%{ | ||
"dialyxir": {:hex, :dialyxir, "1.4.4", "fb3ce8741edeaea59c9ae84d5cec75da00fa89fe401c72d6e047d11a61f65f70", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "cd6111e8017ccd563e65621a4d9a4a1c5cd333df30cebc7face8029cacb4eff6"}, | ||
"dialyxir": {:hex, :dialyxir, "1.4.5", "ca1571ac18e0f88d4ab245f0b60fa31ff1b12cbae2b11bd25d207f865e8ae78a", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "b0fb08bb8107c750db5c0b324fa2df5ceaa0f9307690ee3c1f6ba5b9eb5d35c3"}, | ||
"erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"}, | ||
"ex_aequo_base": {:hex, :ex_aequo_base, "0.1.5", "f528cb921cb97ba008457eff9bfdf657495c68b2d9d8e89a5dfd64cbd6eb34de", [:mix], [{:ex_aequo_fn, "~> 0.1.2", [hex: :ex_aequo_fn, repo: "hexpm", optional: false]}], "hexpm", "55377f8bcf6332567b451d39aa57619bcd1ed4ba3dddc880a68136d6702ef68e"}, | ||
"ex_aequo_fn": {:hex, :ex_aequo_fn, "0.1.2", "d3c6ae73bafb1f2e1661e2b2dc4b548e577ebd7cc24d22afb0efbe1b8dca16ba", [:mix], [], "hexpm", "6e8cecd6e37dc3cd896dc631c5eb2e766e0ff6b914d110cdeedace9bc7ac1d8f"}, | ||
"excoveralls": {:hex, :excoveralls, "0.18.3", "bca47a24d69a3179951f51f1db6d3ed63bca9017f476fe520eb78602d45f7756", [:mix], [{:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "746f404fcd09d5029f1b211739afb8fb8575d775b21f6a3908e7ce3e640724c6"}, | ||
"extractly": {:hex, :extractly, "0.5.4", "22ff3a624d814227ba842a2b59a38b1298df5531dbd4772dcbe9b97e05627145", [:mix], [], "hexpm", "612e16920317b2fb963b2da013019a614ba12b928d535a053a1efb21ddaa6268"}, | ||
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, | ||
"minipeg": {:hex, :minipeg, "0.6.5", "dafbaeb2e7970ff5e2d1604dec46abcc92aaf0918088c511849f4e79751916d2", [:mix], [], "hexpm", "8ac5a89eacdcb699c8f2d7dc0acd40a9930dc65212cce55d0741cca911e478cc"}, | ||
"minipeg": {:hex, :minipeg, "0.7.0", "232d6762560357433e8e4556d9e9d38459ccef80ed13e64e8784ccb8b08a7e0c", [:mix], [], "hexpm", "d9509eab735a410463141d2b9a9713374b4f0d5c97d44cadb64f0a8f23924aaf"}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,20 @@ | ||
defmodule Test.ExAequoColors.ColorizerTest do | ||
use ExUnit.Case | ||
|
||
import ExAequoColors.Colorizer | ||
doctest ExAequoColors.Colorizer, import: true | ||
|
||
describe "rgb" do | ||
test "in dec" do | ||
assert colorize("<23,240,31>rgb dec") == "\e[38;2;23;240;31mrgb dec" | ||
end | ||
test "in hex, 6 bytes" do | ||
assert colorize("<#17f01f>rgb hex 6") == "\e[38;2;23;240;31mrgb hex 6" | ||
end | ||
test "in hex, 3 bytes" do | ||
assert colorize("<#fd8>rgb hex 3") == "\e[38;2;240;208;128mrgb hex 3" | ||
end | ||
end | ||
|
||
end | ||
# SPDX-License-Identifier: AGPL-3.0-or-later |