On Thu, 2018-01-25 at 13:43 +1100, Daniel Axtens wrote: > There are a couple of pages where the clickable list of pages > would include missing or duplicate pages. > > Write a test that ensures: > - you always have a link to the next/prev numbered page > - there are no duplicate page numbers > > Fiddle with the pagination algorithm to get it to pass - required > tweaking a display parameter and a couple of comparison operators, > so all pretty minor. > > Now, if there are 10 pages, the displayed page numbers for a given > page are as follows: > > Page # | Displayed page #s > --------------------------- > 1 | [] [1, 2, 3, 4] [9, 10] > 2 | [] [1, 2, 3, 4] [9, 10] > 3 | [] [1, 2, 3, 4] [9, 10] > 4 | [1, 2] [3, 4, 5] [9, 10] > 5 | [1, 2] [4, 5, 6] [9, 10] > 6 | [1, 2] [5, 6, 7] [9, 10] > 7 | [1, 2] [6, 7, 8] [9, 10] > 8 | [1, 2] [7, 8, 9, 10] [] > 9 | [1, 2] [7, 8, 9, 10] [] > 10 | [1, 2] [7, 8, 9, 10] [] > > Closes: #102 > Signed-off-by: Daniel Axtens <d...@axtens.net>
Yup, looks fine to me. Reviewed-by: Stephen Finucane <step...@that.guru> I'll backport this too. _______________________________________________ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork