1#!perl 2# vim:ts=4:sw=4:expandtab 3 4use Test::More tests => 4; 5use Test::Deep; 6use X11::XCB qw(:all); 7use Data::Dumper; 8 9BEGIN { 10 use_ok('X11::XCB::Connection') or BAIL_OUT('Unable to load X11::XCB::Connection'); 11 use_ok('X11::XCB::Color'); 12} 13 14my $x; 15 16SKIP: { 17 eval { $x = X11::XCB::Connection->new; }; 18 19 skip "Could not setup X11 connection", 2 if $@; 20 21 my $color = $x->color(hexcode => 'C0C0C0'); 22 is($color->pixel, 12632256, 'grey colorpixel matches'); 23 24 $color = $x->color(hexcode => '#C0C0C0'); 25 is($color->pixel, 12632256, 'grey colorpixel matches with #'); 26} 27 28diag( "Testing X11::XCB, Perl $], $^X" ); 29