X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fsearch.t;fp=t%2Fsearch.t;h=bcfe91f5d468e91867116c640f4966f1e9b1667e;hb=efae1c2f67220c18f57bd1ebdf7115abd4d6c6e0;hp=36a8fb3085584a2342248ed29e32ff0bd7eb84f8;hpb=9eb840de546dfe9b6c6aa1588f5bb8c0153c7d71;p=public-inbox.git diff --git a/t/search.t b/t/search.t index 36a8fb30..bcfe91f5 100644 --- a/t/search.t +++ b/t/search.t @@ -536,13 +536,20 @@ $ibx->with_umask(sub { }); SKIP: { + my ($s, $g) = ($ibx->search, $ibx->git); + my $q = $s->query_argv_to_string($g, ["quoted phrase"]); + is($q, q["quoted phrase"], 'quoted phrase'); + $q = $s->query_argv_to_string($g, ['s:pa ce']); + is($q, q[s:"pa ce"], 'space with prefix'); + $q = $s->query_argv_to_string($g, ["\(s:pa ce", "AND", "foo\)"]); + is($q, q[(s:"pa ce" AND foo)], 'space AND foo'); + local $ENV{TZ} = 'UTC'; my $now = strftime('%H:%M:%S', gmtime(time)); if ($now =~ /\A23:(?:59|60)/ || $now =~ /\A00:00:0[01]\z/) { skip 'too close to midnight, time is tricky', 6; } - my ($s, $g) = ($ibx->search, $ibx->git); - my $q = $s->query_argv_to_string($g, [qw(d:20101002 blah)]); + $q = $s->query_argv_to_string($g, [qw(d:20101002 blah)]); is($q, 'd:20101002..20101003 blah', 'YYYYMMDD expanded to range'); $q = $s->query_argv_to_string($g, [qw(d:2010-10-02)]); is($q, 'd:20101002..20101003', 'YYYY-MM-DD expanded to range');