about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2021-11-03 23:13:52 +0530
committerAndinus <andinus@nand.sh>2021-11-03 23:13:52 +0530
commitad61c0387986660c92f20aaf474fb404d67c07a5 (patch)
treeab4ddd4a32b9c8c6d24327cf2835d14a70da98e2
parentf82aa5441c24b3c2f08b019bd2b04e02d845fa41 (diff)
downloadfornax-ad61c0387986660c92f20aaf474fb404d67c07a5.tar.gz
Add tests
-rw-r--r--t/00-basic.rakutest6
-rw-r--r--t/01-hex2rgb.rakutest8
2 files changed, 14 insertions, 0 deletions
diff --git a/t/00-basic.rakutest b/t/00-basic.rakutest
new file mode 100644
index 0000000..a119847
--- /dev/null
+++ b/t/00-basic.rakutest
@@ -0,0 +1,6 @@
+use Test;
+
+plan 2;
+
+use-ok 'Fornax::CLI';
+use-ok 'Fornax::Hex2RGB';
diff --git a/t/01-hex2rgb.rakutest b/t/01-hex2rgb.rakutest
new file mode 100644
index 0000000..ca8bd59
--- /dev/null
+++ b/t/01-hex2rgb.rakutest
@@ -0,0 +1,8 @@
+use Test;
+use Fornax::Hex2RGB;
+
+plan 3;
+
+is hex2rgb("#000000"), (0, 0, 0), "#000000";
+is hex2rgb("#b753db"), (183, 83, 219).map(* / 255), "#b753db";
+is hex2rgb("#ffffff"), (1, 1, 1), "#ffffff";