View | Details | Raw Unified | Return to bug 14602
Collapse All | Expand All

(-)a/t/Creators.t (-6 / +6 lines)
Lines 1-11 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
#
2
#
3
# This Koha test module is a stub!  
3
# This Koha test module is a stub!
4
# Add more tests here!!!
4
# Add more tests here!!!
5
5
6
use strict;
6
use strict;
7
use warnings;
7
use warnings;
8
8
9
use File::Temp qw/ tempfile  /;
9
use Test::More tests => 16;
10
use Test::More tests => 16;
10
11
11
BEGIN {
12
BEGIN {
Lines 50-61 is($pdf_creator->StrWidth("test", "H", 12), $expected_width, "testing StrWidth() Link Here
50
is($result[0], '10', "testing Text() writes from a given x-value");
51
is($result[0], '10', "testing Text() writes from a given x-value");
51
is($result[1], $expected_offset, "testing Text() writes to the correct x-value");
52
is($result[1], $expected_offset, "testing Text() writes to the correct x-value");
52
53
53
open(my $fh, '>', 'test.pdf');
54
my  ($fh, $filename) = tempfile();
55
open(  $fh, '>', $filename );
54
select $fh;
56
select $fh;
55
57
56
ok($pdf_creator->End(), "testing End() works");
58
ok($pdf_creator->End(), "testing End() works");
57
59
58
close($fh);
60
close($fh);
59
ok( -s 'test.pdf', 'test.pdf created' );
61
ok( -s $filename , "test file $filename created OK" );
60
62
unlink $filename ;
61
unlink 'test.pdf';
62
- 

Return to bug 14602