Skip Menu |
 

This queue is for tickets about the PDF-API2 CPAN distribution.

Report information
The Basics
Id: 98574
Status: resolved
Priority: 0/
Queue: PDF-API2

People
Owner: Nobody in particular
Requestors: philperry [...] hvc.rr.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.029



Subject: content.t testing upgrades
Date: Tue, 2 Sep 2014 21:20:08 -0400
To: bug-PDF-API2 [...] rt.cpan.org
From: <philperry [...] hvc.rr.com>
Download (untitled) / with headers
text/plain 1.7k
PDF::API2 v2.022 Perl 5.16.3 Windows 7 Severity: Normal There were many missing installation tests in content.t, for Content.pm. * Added tests for rotate(), scale(), skew(), transform(), transform_rel(), matrix(), save(), restore(), strokecolor(named, RGB), linewidth(), miterlimit(), rect(), rectxy(), pie(), hspace(), hscale(), fill(), fillstroke(), clip(), charspace(), wordspace(), lead(), render(), rise(), distance(), cr(), nl() * some tests will likely have to be updated once fixes are made: nl (see 98535), cr (see 98550), flatness (see 98539) * remove superfluous test cases (not exercising different code paths): flatness(), linecap(), linejoin() * still untested: font(), textstate() * documented, but can these be tested in content.t? shade(), egstate(), image(), formimage(), textpos(), text(), advancewidth(), text_justified(), text_fill_left(), text_fill_center(), text_fill_right(), text_fill_justified() * undocumented: textlabel(), paragraph(), section() * need to test many color inputs: fillcolor() and strokecolor() RGB spec with 1, 3, 4 hex digits per primitive HSV spec with 1, 2, 3, 4 hex digits per primitive CMYK spec with 1, 2, 4 hex digits per primitive HSL spec with ? digits L*a*b spec with ? digits pattern and shading space legacy gray color indexed colorspace legacy RGB legacy CMYK Note that the fillcolor() test includes a 9 digit CMYK (% format) value. Is this an error, or is it really CMY? We need to better document in the POD how the wrong number of digits are to be handled, and test these in content.t. I have submitted an updated content.t to the maintainer.
Download (untitled) / with headers
text/plain 132b
Show quoted text
> I have submitted an updated content.t to the maintainer.
If you still have this file, would you attach it to this ticket, please?
Subject: [rt.cpan.org #98574]
Date: Thu, 18 Feb 2016 16:12:04 -0500
To: bug-PDF-API2 [...] rt.cpan.org
From: Phil M Perry <philperry [...] hvc.rr.com>
Download (untitled) / with headers
text/plain 618b
Show quoted text
>If you still have this file, would you attach it to this ticket, please?
I still have it. Let me review it to see if there's anything in there dependent on bug fixes (tickets) that I submitted but have not yet been accepted, or anything covered in an existing patch I've already sent. I will have to look at nl() and cr(), as well as miterlimit() and hscale(), which you may already have. The three developer's methods can come out if they're still in there. I'll have to look at the bogus CMYK color definition. Maybe this submission should wait until all my Content-related bug tickets have been resolved?
Subject: [rt.cpan.org #98574]
Date: Fri, 19 Feb 2016 19:59:19 -0500
To: bug-PDF-API2 [...] rt.cpan.org
From: Phil M Perry <philperry [...] hvc.rr.com>
Download (untitled) / with headers
text/plain 1.2k
| If you still have this file, would you attach it to this ticket, please? Done. It adds all the tests mentioned in the first bullet, except those already in (per recent patches): hscale() and miterlimit(). The deprecated names are still tested. I removed the nl(width) test, as you have removed that (bullet 2). Any further code changes in nl() and cr() will necessitate an update to content.t. I took out 3 redundant tests in bullet 3 (they did not exercise different code paths). strokecolor() and fillcolor() tests for CMYK had invalid inputs that were not caught in the code. I changed %fff000000 to %ff000000, which is 4 8-bit values. With the extra digit, it just happened to evaluate correctly to 1 0 0 0 (grouped as fff 000 000 0 rather than ff 00 00 00). The tests were also mislabeled as CMY rather than CMYK (presumably the test author was confused and thought they were testing CMY). No code changes were needed, just the inputs from content.t. Perhaps we should do some input validation (count of digits and digit values) in the code? I haven't done anything about tests for bullets 4, 5, and 7. Bullet 6 is 3 "developer routines" that presumably will soon be removed from Content.pm into some other module. Bullet 7 is detailed color specification testing that should be added at some point.
Download content.t
text/x-perl 15.9k

Message body is not shown because sender requested not to inline it.

Download (untitled) / with headers
text/plain 394b
Applied with the following changes: - The test for pie() failed. I pulled it out so that everything else could be applied. - The transform_rel test was matching the wrong part of the PDF, so I extended it (and did the same for transform). - Removed test numbers from the comments so that adding future tests doesn't require renumbering everything. - Updated some comment names for clarity.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.