From c923e0ba3377f85107ccea1933a042aaec675c77 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Feb 2010 20:39:10 -0500 Subject: Allow globs to be used in user() pagespecs. --- t/pagespec_match.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/pagespec_match.t b/t/pagespec_match.t index b96947407..197ff818b 100755 --- a/t/pagespec_match.t +++ b/t/pagespec_match.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 64; +use Test::More tests => 70; BEGIN { use_ok("IkiWiki"); } @@ -40,6 +40,13 @@ ok(! pagespec_match("foo", "foo and bar"), "foo and bar"); ok(pagespec_match("{f}oo", "{*}*"), "curly match"); ok(! pagespec_match("foo", "{*}*"), "curly !match"); +ok(pagespec_match("somepage", "user(frodo)", user => "frodo")); +ok(pagespec_match("somepage", "user(frodo)", user => "Frodo")); +ok(! pagespec_match("somepage", "user(frodo)", user => "Sam")); +ok(pagespec_match("somepage", "user(*o)", user => "Bilbo")); +ok(pagespec_match("somepage", "user(*o)", user => "frodo")); +ok(! pagespec_match("somepage", "user(*o)", user => "Sam")); + # The link and backlink stuff needs this. $config{userdir}=""; $links{foo}=[qw{bar baz}]; -- cgit v1.2.3