#!perl -T

use strict;
use Inline 'untaint';
use Test::Most tests => 1;

use Graphics::Framebuffer;

BEGIN {
    $^W = 0;
}

unless (defined($ENV{'DISPLAY'})) {
    $ENV{'PATH'} .= ':/usr/share/fonts';
    my $F = Graphics::Framebuffer->new('FILE_MODE' => 0);

    isa_ok($F,'Graphics::Framebuffer');
    $F->cls() if (defined($F));
    unless (defined($F)) {
        diag("If Testing Failed, it's because you are either:\n\n1> Are installing from within X-Windows\n2> You don't have a Framebuffer to test with (/dev/fb0)\n3> Or your a CPAN tester that's not reading the instructions, and improperly marking this module failed.\n");
    }
} else {
    diag("\n\nYou are installing from within X-Windows!  This is BAD, go to a REAL console.\n\nIf you are a CPAN tester, then shame on you, and install according to the documentation.\n\n");
    ok(1,'In X-Windows (shame on you).  Skipping tests');
}
