Bugzilla – Attachment 41188 Details for
Bug 14602
Fix failing t/Creators.t test, when using koha-shell
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14602 - Fix failing t/Creators.t test
Bug-14602---Fix-failing-tCreatorst-test.patch (text/plain), 2.23 KB, created by
Mason James
on 2015-07-25 08:56:42 UTC
(
hide
)
Description:
Bug 14602 - Fix failing t/Creators.t test
Filename:
MIME Type:
Creator:
Mason James
Created:
2015-07-25 08:56:42 UTC
Size:
2.23 KB
patch
obsolete
>From ae7943a8bfbd5a0140ddc1e1cde69177128c594f Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Sat, 25 Jul 2015 20:51:52 +1200 >Subject: [PATCH] Bug 14602 - Fix failing t/Creators.t test >Content-Type: text/plain; charset="utf-8" > >to test.. > >1/ run t/Creators.t test from git repo, get a FAIL > >2/ apply patch > >3/ repeat step 1, get a PASS > >mason@xen1:~/g/k/3.16.x$ sudo koha-shell -c 'export PERL5LIB=/home/mason/g/k/3.16.x ; cd /home/mason/g/k/3.16.x ; prove -v t/Creators.t' k316x1 >t/Creators.t .. >1..16 >ok 1 - use C4::Creators; >ok 2 - use C4::Creators::PDF; >ok 3 - testing new() works >ok 4 - testing pdf file created >ok 5 - testing Add() works >ok 6 - testing Bookmark() works >ok 7 - testing Compress() works >ok 8 - testing Font() works >ok 9 - testing FontSize() is set to 12 by default >ok 10 - testing FontSize() can be set to a different value >ok 11 - testing Page() works >ok 12 - testing StrWidth() returns correct point width >ok 13 - testing Text() writes from a given x-value >ok 14 - testing Text() writes to the correct x-value >ok 15 - testing End() works >ok 16 - test file /tmp/4YjPQDExeS created OK >ok >All tests successful. >Files=1, Tests=16, 1 wallclock secs ( 0.03 usr 0.01 sys + 0.48 cusr 0.05 csys = 0.57 CPU) >Result: PASS >--- > t/Creators.t | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > >diff --git a/t/Creators.t b/t/Creators.t >index 646aef5..1aecc58 100755 >--- a/t/Creators.t >+++ b/t/Creators.t >@@ -1,11 +1,12 @@ > #!/usr/bin/perl > # >-# This Koha test module is a stub! >+# This Koha test module is a stub! > # Add more tests here!!! > > use strict; > use warnings; > >+use File::Temp qw/ tempfile /; > use Test::More tests => 16; > > BEGIN { >@@ -50,12 +51,12 @@ is($pdf_creator->StrWidth("test", "H", 12), $expected_width, "testing StrWidth() > is($result[0], '10', "testing Text() writes from a given x-value"); > is($result[1], $expected_offset, "testing Text() writes to the correct x-value"); > >-open(my $fh, '>', 'test.pdf'); >+my ($fh, $filename) = tempfile(); >+open( $fh, '>', $filename ); > select $fh; > > ok($pdf_creator->End(), "testing End() works"); > > close($fh); >-ok( -s 'test.pdf', 'test.pdf created' ); >- >-unlink 'test.pdf'; >+ok( -s $filename , "test file $filename created OK" ); >+unlink $filename ; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14602
:
41188
|
41303
|
42315