-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test suite: Add tests for undefined page range limits #208
Conversation
Currently you cannot verify if it works because the commit from #201 broke the test suite. More info in the ticket. |
But I applied the PR on the commit before the commit from #201 locally, ran the test suite and it passed, so it could suffice for verification. |
@zdohnal What were the errors you were seeing? The page-ranges attribute should only be encoded as a rangeOfInteger, with an undefined lower limit getting a value of 1 and an undefined upper limit getting a value of INT_MAX (2^31-1). I have no problem with adding a test for this (and I should probably add some unit tests to make sure each option is encoded as expected in libcups) but the filters should never see "N-" or "-N", just "N-2147483647" and "1-N". |
2a73285
to
819a7d6
Compare
It would be great - it's on my TODO list to do the similar thing, especially in cups-filters, where conversion from filter executables to filter functions is happening and it would be great if we had means to check about regressions.
|
Actually, I'll rather create a separate PR for it. |
@michaelrsweet The filter tests will come in the future PR, would you mind merging this PR in the meantime? P.S. The error reported by Codacy looks bogus - |
@zdohnal I want to spend a little more time reviewing things before I merge. Test suite changes like this can have unintended consequences... :/ |
@michaelrsweet ok, no problem, take your time - my comment before that could implicate that there will be more stuff coming into the PR, so I wanted to make sure that you aren't waiting on me :) . |
819a7d6
to
53b9f42
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let's clean up the "expected" count here and then merge. I'll look at a way to automate the expected request calculations.
53b9f42
to
ff54488
Compare
Originally pdftopdf from cups-filters doesn't support page range with undefined upper limit (f.e. '5-'), but I found out these page ranges aren't checked in CUPS test suite neither. It would be great if we could cover the use case in test suite to prevent possible regressions in the future.
b313b87
to
55c7dfa
Compare
Originally pdftopdf from cups-filters doesn't support page range with
undefined upper limit (f.e. '5-'), but I found out these page ranges
aren't checked in CUPS test suite neither.
It would be great if we could cover the use case in test suite to
prevent possible regressions in the future.