File: currpage.t

package info (click to toggle)
libdata-paginator-perl 0.08-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 144 kB
  • sloc: perl: 335; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 287 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use Test::More;

use Data::Paginator;

my $pager = Data::Paginator->new({
    total_entries       => 24,
    entries_per_page    => 4,   # This means there will be 6 pages
    current_page        => 1,
});

$pager->current_page(12);

cmp_ok($pager->current_page, '==', 1);

done_testing;