diff options
author | Oliver Lenehan <sunsetkookaburra+git@outlook.com.au> | 2020-05-21 00:29:59 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 10:29:59 -0400 |
commit | 662eb8f8c981565950d35cdd1c9ca6a67eaef8f2 (patch) | |
tree | 2aaf3fcdc11c0f8968197edc342e15f8cb194fed /std/fmt/colors_test.ts | |
parent | f5c0188b5edf9451aca42347dd4a48708fefce23 (diff) |
feat(std/fmt): rgb24 and bgRgb24 can use numbers for color (#5198)
Diffstat (limited to 'std/fmt/colors_test.ts')
-rw-r--r-- | std/fmt/colors_test.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/std/fmt/colors_test.ts b/std/fmt/colors_test.ts index cfa189d30..7a312202a 100644 --- a/std/fmt/colors_test.ts +++ b/std/fmt/colors_test.ts @@ -146,6 +146,10 @@ Deno.test("test_rgb24", function (): void { ); }); +Deno.test("test_rgb24number", function (): void { + assertEquals(c.rgb24("foo bar", 0x070809), "[38;2;7;8;9mfoo bar[39m"); +}); + Deno.test("test_bgRgb24", function (): void { assertEquals( c.bgRgb24("foo bar", { @@ -156,3 +160,7 @@ Deno.test("test_bgRgb24", function (): void { "[48;2;41;42;43mfoo bar[49m" ); }); + +Deno.test("test_bgRgb24number", function (): void { + assertEquals(c.bgRgb24("foo bar", 0x070809), "[48;2;7;8;9mfoo bar[49m"); +}); |