aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-04-12 15:16:57 -0400
committerJoey Hess <joey@gnu.kitenet.net>2010-04-12 15:16:57 -0400
commitf5da8d3aed4b710983c7492cf708d0c874bce9e7 (patch)
treede739fa39725cdb8db547e789a75f93ee522071b
parent5ce4c89dee82119a2f1147094eda82a735ea8098 (diff)
downloadikiwiki-f5da8d3aed4b710983c7492cf708d0c874bce9e7.tar
ikiwiki-f5da8d3aed4b710983c7492cf708d0c874bce9e7.tar.gz
more tests with more items
-rwxr-xr-xt/pagespec_match_list.t13
1 files changed, 12 insertions, 1 deletions
diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t
index c7688c6c0..05dc012fe 100755
--- a/t/pagespec_match_list.t
+++ b/t/pagespec_match_list.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use warnings;
use strict;
-use Test::More tests => 92;
+use Test::More tests => 94;
BEGIN { use_ok("IkiWiki"); }
@@ -132,3 +132,14 @@ foreach my $spec ("nosuchpage or link(bar)", "link(bar) or nosuchpage",
%IkiWiki::depends_simple=();
%IkiWiki::depends=();
}
+
+my @ps;
+foreach my $p (100..500) {
+ $IkiWiki::pagectime{"p/$p"} = $p;
+ $pagesources{"p/$p"} = "p/$p.mdwn";
+ unshift @ps, "p/$p";
+}
+is_deeply([pagespec_match_list("foo", "p/*", sort => "age")],
+ [@ps]);
+is_deeply([pagespec_match_list("foo", "p/*", sort => "age", num => 20)],
+ [@ps[0..19]]);