File: plot.t

package info (click to toggle)
libgd-barcode-perl 2.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,388 kB
  • sloc: perl: 6,561; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 429 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use Test2::V0;

use GD::Barcode;
use File::Temp qw(tempfile);
use File::stat;

use Test2::Require::Module 'GD';


my $oGdBar = GD::Barcode->new("EAN13", "123456789012");

my ($fh, $filename) = tempfile();
binmode $fh;
print $fh $oGdBar->plot->png;
close $fh;

my $filesize = stat($filename)->size;
ok($filesize > 0, 'Generated PNG file is not empty');

unlink $filename or diag "Could not unlink $filename: $!";

done_testing();