summaryrefslogtreecommitdiff
path: root/t/03-HTML.t
diff options
context:
space:
mode:
Diffstat (limited to 't/03-HTML.t')
-rw-r--r--t/03-HTML.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/03-HTML.t b/t/03-HTML.t
new file mode 100644
index 0000000..f59d6dd
--- /dev/null
+++ b/t/03-HTML.t
@@ -0,0 +1,23 @@
+#!/usr/bin/perl
+
+use strict;
+use Test::More tests => 7;
+
+use_ok('Graphics::ColorNames', 1.06, qw( hex2tuple tuple2hex ));
+
+tie my %colors, 'Graphics::ColorNames', 'HTML';
+ok(tied %colors);
+
+ok(keys %colors == 17);
+
+my $count = 0;
+foreach my $name (keys %colors)
+ {
+ my @RGB = hex2tuple( $colors{$name} );
+ $count++, if (tuple2hex(@RGB) eq $colors{$name} );
+ }
+ok($count == keys %colors);
+
+ok(exists($colors{"fuchsia"}));
+ok(exists($colors{"fuscia"}));
+ok($colors{"fuscia"} eq $colors{"fuchsia"});