diff options
author | Simon McVittie <smcv@debian.org> | 2011-11-12 16:02:20 +0000 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-12-06 14:26:34 -0400 |
commit | ea313b8133e65947d07c1e13b41584f7582d99e1 (patch) | |
tree | 8c9027c1ab34735b2b1d6137080f33aa72402fe6 /t/pagespec_match_list.t | |
parent | 5333c113d62acd0b82551e499863abaf749a6a1f (diff) | |
download | ikiwiki-ea313b8133e65947d07c1e13b41584f7582d99e1.tar ikiwiki-ea313b8133e65947d07c1e13b41584f7582d99e1.tar.gz |
Add path and path_natural sort orders
These correspond to title and title_natural, but compare the entire
path: a < a/b < a/z < ab < b.
(cherry picked from commit 903a5a314f1f5d833dbc208ce128f24195b40e4b)
Diffstat (limited to 't/pagespec_match_list.t')
-rwxr-xr-x | t/pagespec_match_list.t | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index 244ad9159..7ff178aad 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -12,7 +12,7 @@ IkiWiki::checkconfig(); { package IkiWiki::SortSpec; - sub cmp_path { $a cmp $b } + sub cmp_raw_path { $a cmp $b } } %pagesources=( @@ -53,7 +53,7 @@ is_deeply([pagespec_match_list("foo", "post/*", sort => "title", num => 50, reve is_deeply([pagespec_match_list("foo", "post/*", sort => "title", filter => sub { $_[0] =~ /3/}) ], ["post/1", "post/2"]); -is_deeply([pagespec_match_list("foo", "*", sort => "path", num => 2)], +is_deeply([pagespec_match_list("foo", "*", sort => "raw_path", num => 2)], ["bar", "foo"]); is_deeply([pagespec_match_list("foo", "foo* or bar*", sort => "-age title")], # oldest first, break ties by title |