/[pgestraier]/trunk/t/pgest.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/t/pgest.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 13 by dpavlin, Wed May 25 23:38:37 2005 UTC revision 14 by dpavlin, Thu May 26 00:06:10 2005 UTC
# Line 2  Line 2 
2    
3  use strict;  use strict;
4    
5  use Test::More tests => 49;  use Test::More tests => 67;
6    
7  BEGIN {  BEGIN {
8          use_ok('DBI');          use_ok('DBI');
# Line 95  cmp_ok($hits, '==', pgest('blade runner' Line 95  cmp_ok($hits, '==', pgest('blade runner'
95  cmp_ok($hits, '==', pgest('blade runner', '', 0, undef), "null offset");  cmp_ok($hits, '==', pgest('blade runner', '', 0, undef), "null offset");
96  cmp_ok($hits, '==', pgest('blade runner', undef, undef, undef), "null optional");  cmp_ok($hits, '==', pgest('blade runner', undef, undef, undef), "null optional");
97    
98    # test limit, offset and global mess
99    my $d = int($hits / 3);
100    cmp_ok($d, '==', pgest('blade runner',undef, $d, undef), "limit $d");
101    cmp_ok($hits, '==', pgest('blade runner', undef, undef, undef), "check");
102    
103    cmp_ok(($hits - $d), '==', pgest('blade runner',undef, undef, $d), "offset $d");
104    cmp_ok($hits, '==', pgest('blade runner', undef, undef, undef), "check");
105    
106    cmp_ok(($hits - $d - $d), '==', pgest('blade runner',undef, ($hits - $d), $d), "limit $d offset $d");
107    cmp_ok($hits, '==', pgest('blade runner', undef, undef, undef), "check");

Legend:
Removed from v.13  
changed lines
  Added in v.14

  ViewVC Help
Powered by ViewVC 1.1.26